From: Jens Axboe <axboe@kernel.dk>
To: Jakob Koschel <jakobkoschel@gmail.com>
Cc: linux-block <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 06:06:52 -0600 [thread overview]
Message-ID: <51522714-1194-57cf-b5c2-af497671fa09@kernel.dk> (raw)
In-Reply-To: <E262CAA9-1B49-4035-9181-28C6FFDBE21F@gmail.com>
On 3/31/22 6:00 AM, Jakob Koschel wrote:
>
>
>> On 31. Mar 2022, at 13:59, Jens Axboe <axboe@kernel.dk> wrote:
>>
>> 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.
>
> I'm fine with you doing the change locally, thanks!
OK, I did that, it's in. Thanks!
--
Jens Axboe
next prev parent reply other threads:[~2022-03-31 12:07 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
2022-03-31 12:00 ` Jakob Koschel
2022-03-31 12:06 ` Jens Axboe [this message]
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=51522714-1194-57cf-b5c2-af497671fa09@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®