From: Ammar Faizi <[email protected]>
To: Pavel Begunkov <[email protected]>,
io-uring Mailing List <[email protected]>
Cc: Jens Axboe <[email protected]>
Subject: Re: [PATCH liburing v2 5/5] liburing: improve fallocate typecasting
Date: Mon, 25 Jul 2022 19:21:56 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <bbcd93f438c60073bb06ae7ab02f6ebd770ecdcb.1658748624.git.asml.silence@gmail.com>
On 7/25/22 6:33 PM, Pavel Begunkov wrote:
> Don't double cast int -> ptr -> int in io_uring_prep_fallocate(), assign
> len directly.
>
> Signed-off-by: Pavel Begunkov <[email protected]>
> ---
> src/include/liburing.h | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
[...]
> io_uring_prep_rw(IORING_OP_FALLOCATE, sqe, fd,
> - (const uintptr_t *) (unsigned long) len,
> - (unsigned int) mode, (__u64) offset);
> + 0, (unsigned int) mode, (__u64) offset);
nit: instead of 0 it's better to use NULL. No?
> + sqe->addr = (__u64) len;
This one looks simpler than a double cast.
Reviewed-by: Ammar Faizi <[email protected]>
--
Ammar Faizi
next prev parent reply other threads:[~2022-07-25 12:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 11:33 [PATCH liburing v2 0/5] zerocopy send headers and tests Pavel Begunkov
2022-07-25 11:33 ` [PATCH liburing v2 1/5] io_uring.h: sync with kernel for zc send and notifiers Pavel Begunkov
2022-07-25 11:33 ` [PATCH liburing v2 2/5] liburing: add zc send and notif helpers Pavel Begunkov
2022-07-25 12:35 ` Ammar Faizi
2022-07-25 11:33 ` [PATCH liburing v2 3/5] tests: add tests for zerocopy send and notifications Pavel Begunkov
2022-07-25 11:33 ` [PATCH liburing v2 4/5] examples: add a zerocopy send example Pavel Begunkov
2022-07-25 11:33 ` [PATCH liburing v2 5/5] liburing: improve fallocate typecasting Pavel Begunkov
2022-07-25 12:21 ` Ammar Faizi [this message]
2022-07-25 12:17 ` [PATCH liburing v2 0/5] zerocopy send headers and tests Ammar Faizi
2022-07-25 15:48 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox