All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jakob Koschel <jakobkoschel@gmail.com>
Cc: "Jason Gunthorpe" <jgg@ziepe.ca>,
	"Håkon Bugge" <haakon.bugge@oracle.com>,
	"Mark Zhang" <markzhang@nvidia.com>,
	"Mark Bloch" <mbloch@nvidia.com>,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.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] IB/SA: replace usage of found with dedicated list iterator variable
Date: Mon, 28 Mar 2022 09:27:18 +0300	[thread overview]
Message-ID: <YkFVRgZpfbsbpGuH@unreal> (raw)
In-Reply-To: <20220327212943.2165728-1-jakobkoschel@gmail.com>

On Sun, Mar 27, 2022 at 11:29:43PM +0200, 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].
> 
> This removes the need to use a found variable and simply checking if
> the variable was set, can determine if the break/goto was hit.
> 
> v1->v2:
> - set query correctly (Mark Zhang)
> 
> Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
> Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
> ---

Please put changelog and Link after "---" section, as we don't need it
in git commit history.

>  drivers/infiniband/core/sa_query.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)

The change itself is LGTM.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

      reply	other threads:[~2022-03-28  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-27 21:29 [PATCH v2] IB/SA: replace usage of found with dedicated list iterator variable Jakob Koschel
2022-03-28  6:27 ` Leon Romanovsky [this message]

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=YkFVRgZpfbsbpGuH@unreal \
    --to=leon@kernel.org \
    --cc=bjohannesmeyer@gmail.com \
    --cc=c.giuffrida@vu.nl \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=h.j.bos@vu.nl \
    --cc=haakon.bugge@oracle.com \
    --cc=jakobkoschel@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=markzhang@nvidia.com \
    --cc=mbloch@nvidia.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.