From: Paolo Abeni <pabeni@redhat.com>
To: Xiaomeng Tong <xiam0nd.tong@gmail.com>,
davem@davemloft.net, kuba@kernel.org
Cc: aelior@marvell.com, manishc@marvell.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] qed: remove an unneed NULL check on list iterator
Date: Tue, 22 Mar 2022 09:52:27 +0100 [thread overview]
Message-ID: <cb10f1946d38d551e408e3ab14998c0b434bf56a.camel@redhat.com> (raw)
In-Reply-To: <20220319043606.23292-1-xiam0nd.tong@gmail.com>
Hello,
On Sat, 2022-03-19 at 12:36 +0800, Xiaomeng Tong wrote:
> The define for_each_pci_dev(d) is:
> while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
>
> Thus, the list iterator 'd' is always non-NULL so it doesn't need to
> be checked. So just remove the unnecessary NULL check. Also remove the
> unnecessary initializer because the list iterator is always initialized.
>
> Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
This looks like a net-next change, but net-next is now closed. please
repost 2 weeks, thanks!
Paolo
next prev parent reply other threads:[~2022-03-22 8:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-19 4:36 [PATCH] qed: remove an unneed NULL check on list iterator Xiaomeng Tong
2022-03-22 8:52 ` Paolo Abeni [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-04-05 0:22 Xiaomeng Tong
2022-04-06 1:26 ` Jakub Kicinski
2022-04-07 1:22 ` Xiaomeng Tong
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=cb10f1946d38d551e408e3ab14998c0b434bf56a.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=aelior@marvell.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=xiam0nd.tong@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).