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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da146a22-0112-9964-ea2d-7bc5e10a5c39@redhat.com>
Date:	Mon, 13 Jun 2016 12:27:05 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Chris Mason <clm@...com>,
	Arjan van de Ven <arjan@...radead.org>, rt@...utronix.de
Subject: Re: [patch 11/20] hlist: Add hlist_is_last_node() helper



On 13/06/2016 10:40, Thomas Gleixner wrote:
>  /*
> + * Check whether the node is the last node of the head without
> + * accessing head.
> + */
> +static inline bool hlist_is_last_node(struct hlist_node *n,
> +				      struct hlist_head *h)
> +{
> +	return !n->next && n->pprev == &h->first;
> +}

Perhaps hlist_is_only_node, or hlist_is_singular_node (which is ugly but
matches list_is_singular)?  last_node seems to check only for !n->next.

Thanks,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ