lkml.org 
[lkml]   [2022]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] qed: remove an unneed NULL check on list iterator
From
Date
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

\
 
 \ /
  Last update: 2022-03-22 09:53    [W:0.133 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site