Linux io-uring development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: io-uring <io-uring@vger.kernel.org>
Cc: Gabriel Krisman Bertazi <krisman@suse.de>
Subject: [PATCH] io_uring/rw: use NULL for rw->free_iovec assigment
Date: Tue, 17 Dec 2024 12:45:34 -0700	[thread overview]
Message-ID: <987219ec-d6ba-427e-a9fa-9ac63660bb72@kernel.dk> (raw)

It's a pointer, don't use 0 for that. sparse throws a warning for that,
as the kernel test robot noticed.

Fixes: 8cf0c459993e ("io_uring/rw: Allocate async data through helper")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412180253.YML3qN4d-lkp@intel.com/
Signed-off-by: Jens Axboe <axboe@kernel.dk>

---

diff --git a/io_uring/rw.c b/io_uring/rw.c
index d0ac4a51420e..75f70935ccf4 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -212,7 +212,7 @@ static void io_rw_async_data_init(void *obj)
 {
 	struct io_async_rw *rw = (struct io_async_rw *)obj;
 
-	rw->free_iovec = 0;
+	rw->free_iovec = NULL;
 	rw->bytes_done = 0;
 }
 
-- 
Jens Axboe


             reply	other threads:[~2024-12-17 19:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 19:45 Jens Axboe [this message]
2024-12-18 15:08 ` [PATCH] io_uring/rw: use NULL for rw->free_iovec assigment Anuj gupta

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 \
    --in-reply-to=987219ec-d6ba-427e-a9fa-9ac63660bb72@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=krisman@suse.de \
    /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