public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 3/5] io_uring: silence io_for_each_link() warning
Date: Fri, 25 Mar 2022 11:52:16 +0000	[thread overview]
Message-ID: <f0de77b0b0f8309554ba6fba34327b7813bcc3ff.1648209006.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

Some tooling keep complaining about self assignment in
io_for_each_link(), the code is correct but still let's workaround it.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 fs/io_uring.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index b868c7c85a94..e651a0bb00fe 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -7057,9 +7057,10 @@ static int io_req_prep_async(struct io_kiocb *req)
 static u32 io_get_sequence(struct io_kiocb *req)
 {
 	u32 seq = req->ctx->cached_sq_head;
+	struct io_kiocb *cur;
 
 	/* need original cached_sq_head, but it was increased for each req */
-	io_for_each_link(req, req)
+	io_for_each_link(cur, req)
 		seq--;
 	return seq;
 }
-- 
2.35.1


  parent reply	other threads:[~2022-03-25 11:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 11:52 [PATCH 0/5] small for-next cleanups Pavel Begunkov
2022-03-25 11:52 ` [PATCH 1/5] io_uring: cleanup conditional submit locking Pavel Begunkov
2022-03-25 11:52 ` [PATCH 2/5] io_uring: partially uninline io_put_task() Pavel Begunkov
2022-03-25 11:52 ` Pavel Begunkov [this message]
2022-03-25 12:35   ` [PATCH 3/5] io_uring: silence io_for_each_link() warning Jens Axboe
2022-03-25 11:52 ` [PATCH 4/5] io_uring: refactor io_req_add_compl_list() Pavel Begunkov
2022-03-25 11:52 ` [PATCH 5/5] io_uring: improve req fields comments Pavel Begunkov
2022-03-25 12:37   ` Jens Axboe
2022-03-25 12:38 ` (subset) [PATCH 0/5] small for-next cleanups Jens Axboe
2022-03-25 12:39 ` 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=f0de77b0b0f8309554ba6fba34327b7813bcc3ff.1648209006.git.asml.silence@gmail.com \
    [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