lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 9 Apr 2022 03:08:22 +0300
From:   Vladimir Oltean <>
To:     Jakob Koschel <>
Cc:     Jakub Kicinski <>,
        "David S. Miller" <>,
        Paolo Abeni <>, Andrew Lunn <>,
        Vivien Didelot <>,
        Florian Fainelli <>,
        Lars Povlsen <>,
        Steen Hegelund <>,, Ariel Elior <>,
        Manish Chopra <>,
        Edward Cree <>,
        Martin Habets <>,
        Michael Ellerman <>,
        Benjamin Herrenschmidt <>,
        Paul Mackerras <>,
        Jiri Pirko <>,
        Casper Andersson <>,
        Bjarni Jonasson <>,
        Colin Ian King <>,
        Michael Walle <>,
        Christophe JAILLET <>,
        Arnd Bergmann <>,
        Eric Dumazet <>,
        Di Zhu <>, Xu Wang <>,,,,, Mike Rapoport <>,
        Brian Johannesmeyer <>,
        Cristiano Giuffrida <>,
        "Bos, H.J." <>
Subject: Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of
 iterator for list_add() after loop

On Sat, Apr 09, 2022 at 01:58:29AM +0200, Jakob Koschel wrote:
> Hello Jakub,
> > Also the list_add() could be converted to list_add_tail().
> Good point, I wasn't sure if that's considered as something that should be
> done as a separate change. I'm happy to include it in v2.

By now you probably studied more list access patterns than I did,
but I wrote that deliberately using list_add(..., pos->prev) rather than
list_add_tail(), because even though the code is the same, I tend to
think of the "head" argument of list_add_tail() as being the actual head
of the list, and therefore the head->prev being the tail of the list
(hence the name), something which doesn't hold true here where we're
inserting in the middle of the list. Anyway it's just a name and that's
what felt natural to me at the time, I won't oppose the change, but do
make it a separate change and not clump it together with the unrelated
list_for_each_entry() -> list_for_each() change.

Powered by blists - more mailing lists