lkml.org 
[lkml]   [2021]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] hashtable: remove a redundant check in hash_for_each_xxx()
On Wed, Oct 06, 2021 at 03:21:00PM +0000, Wei Yang wrote:
> The three hash_for_each_xxx() helper iterate the hash table with help
> of hlist_for_each_entry_xxx(), which breaks the loop only when obj is
> NULL.
>
> This means the check during each iteration is redundant. This patch
> removes it.

Are you sure that the compiler didn't already remove it? Is the code
output the same or different with this change?

How did you test this?

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-10-06 17:29    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog