lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 26 Oct 2023 11:52:34 +0200
From:   Miklos Szeredi <mszeredi@...hat.com>
To:     David Laight <David.Laight@...lab.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Takashi Iwai <tiwai@...e.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Christian Brauner <brauner@...nel.org>,
        James Bottomley <James.Bottomley@...senpartnership.com>
Subject: Re: [RFC PATCH 1/2] add list_for_each_entry_del()

On Sat, Oct 21, 2023 at 12:00 PM David Laight <David.Laight@...lab.com> wrote:

> Adding a list_del_first() function that returns the deleted
> item or NULL to optimise it might make more sense.

Something like this?

- list_for_each_entry_del(entry, head, member))
+ while (list_del_first(entry, head, member))

This allows the compact loop condition, and I always hated having to
pass the type to list_*entry()...  Disadvantage being that the
assignment is now implicit (just as with all the list iterators).

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ