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]
Message-ID: <20190625100606.GF1462@lst.de>
Date:   Tue, 25 Jun 2019 12:06:06 +0200
From:   Christoph Hellwig <hch@....de>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Christoph Hellwig <hch@....de>,
        "Darrick J . Wong" <darrick.wong@...cle.com>,
        Damien Le Moal <Damien.LeMoal@....com>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/12] list.h: add a list_pop helper

On Mon, Jun 24, 2019 at 08:51:37AM -0700, Matthew Wilcox wrote:
> The usual convention in list.h is that list_foo uses the list head and
> list_foo_entry uses the container type.  So I think this should be
> renamed to list_pop_entry() at least.  Do we also want:
> 
> static inline struct list_head *list_pop(struct list_head *head)
> {
> 	struct list_head *first = READ_ONCE(head->next);
> 
> 	if (first == head)
> 		return NULL;
> 	__list_del(head, first->next);
> 	return first;
> }
> 
> we also seem to prefer using inline functions over #defines in this
> header file.

Sure, I can rename it and split the implementation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ