From: Jens Axboe <axboe@kernel.dk>
To: Jakob Koschel <jakobkoschel@gmail.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Bart Van Assche <bvanassche@acm.org>,
Mike Rapoport <rppt@kernel.org>,
Brian Johannesmeyer <bjohannesmeyer@gmail.com>,
Cristiano Giuffrida <c.giuffrida@vu.nl>,
"Bos, H.J." <h.j.bos@vu.nl>
Subject: Re: [PATCH v2] block: use dedicated list iterator variable
Date: Thu, 31 Mar 2022 05:59:33 -0600 [thread overview]
Message-ID: <a7b2fe8d-9967-2046-67a5-62d10e95a861@kernel.dk> (raw)
In-Reply-To: <20220331091218.641532-1-jakobkoschel@gmail.com>
On 3/31/22 3:12 AM, Jakob Koschel wrote:
> To move the list iterator variable into the list_for_each_entry_*()
> macro in the future it should be avoided to use the list iterator
> variable after the loop body.
>
> To *never* use the list iterator variable after the loop it was
> concluded to use a separate iterator variable instead of a
> found boolean [1].
Not a huge fan of doing a helper for this single use, but I guess it
does make the main function easier to code. So I guess that's fine. But
can you move the call down where the result is checked?
qe = blk_lookup_qe_pair(head, q);
if (!qe)
return;
I prefer no distance between call and check, makes it easier to read. I
can make the edit locally and note it in the commit message so you don't
have to re-send it. Let me know, or just resend a v3.
--
Jens Axboe
next prev parent reply other threads:[~2022-03-31 12:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 9:12 Jakob Koschel
2022-03-31 11:59 ` Jens Axboe [this message]
2022-03-31 12:00 ` Jakob Koschel
2022-03-31 12:06 ` Jens Axboe
2022-03-31 12:06 ` 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=a7b2fe8d-9967-2046-67a5-62d10e95a861@kernel.dk \
--to=axboe@kernel.dk \
--cc=bjohannesmeyer@gmail.com \
--cc=bvanassche@acm.org \
--cc=c.giuffrida@vu.nl \
--cc=h.j.bos@vu.nl \
--cc=jakobkoschel@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rppt@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
all inboxes | Powered by JetHome®