[lkml]   [2022]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH net-next v4 07/18] net: dsa: Replace usage of found with dedicated list iterator variable

On 4/15/2022 5:29 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].
> 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.
> Link: [1]
> Signed-off-by: Jakob Koschel <>

Reviewed-by: Florian Fainelli <>

 \ /
  Last update: 2022-04-16 21:39    [W:0.089 / U:2.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site