public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: asml.silence@gmail.com
Subject: [PATCH] io_uring: remove dead code after drain rework
Date: Sun, 11 May 2025 09:01:23 +0100	[thread overview]
Message-ID: <24497b04b004bceada496033d3c9d09ff8e81ae9.1746944903.git.asml.silence@gmail.com> (raw)

io_drain_req() uses a helper function for counting the number of
requests in a link, remove unused open coded accounting that
was accidentially left.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505100200.cyy3V6oJ-lkp@intel.com/
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---

Should also be fine to squash into the original patch

 io_uring/io_uring.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 0fda1b1a33ae..41f8709abfc5 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1649,8 +1649,6 @@ static __cold void io_drain_req(struct io_kiocb *req)
 	struct io_ring_ctx *ctx = req->ctx;
 	bool drain = req->flags & IOSQE_IO_DRAIN;
 	struct io_defer_entry *de;
-	struct io_kiocb *tmp;
-	int nr = 0;
 
 	de = kmalloc(sizeof(*de), GFP_KERNEL_ACCOUNT);
 	if (!de) {
@@ -1658,8 +1656,6 @@ static __cold void io_drain_req(struct io_kiocb *req)
 		return;
 	}
 
-	io_for_each_link(tmp, req)
-		nr++;
 	io_prep_async_link(req);
 	trace_io_uring_defer(req);
 	de->req = req;
-- 
2.49.0


             reply	other threads:[~2025-05-11  8:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-11  8:01 Pavel Begunkov [this message]
2025-05-12 13:54 ` [PATCH] io_uring: remove dead code after drain rework 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 \
    --in-reply-to=24497b04b004bceada496033d3c9d09ff8e81ae9.1746944903.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    /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