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:   Tue, 20 Dec 2016 13:53:21 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc:     Roger Pau Monné <roger.pau@...rix.com>,
        Geliang Tang <geliangtang@...il.com>,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xen/blkback: use rb_entry()

On Tue, 2016-12-20 at 12:51 -0500, Konrad Rzeszutek Wilk wrote:
> On Tue, Dec 20, 2016 at 05:44:06PM +0000, Roger Pau Monné wrote:
> > On Tue, Dec 20, 2016 at 11:47:03AM -0500, Konrad Rzeszutek Wilk wrote:
> > > On Tue, Dec 20, 2016 at 10:02:19PM +0800, Geliang Tang wrote:
> > > > To make the code clearer, use rb_entry() instead of container_of() to
> > > > deal with rbtree.
> > > 
> > > That is OK but I think 'container_of' is more clear.
> > > 
> > > Roger, thoughts?
> > 
> > I think so, container_of is a global macro that's widely used and everyone
> > knows, rb_entry OTOH it's not and it's use doesn't really simply the code at
> > all. I'm not really opposed, but it seems kind of a pointless change (not that
> > it's wrong).
> 
> <nods> I concur.
> 
> Geliang Tang,
> 
> Thank you for the patch but there is no need for it.

The same could be said of list_entry()

#define hlist_entry(ptr, type, member) container_of(ptr,type,member)

#define list_entry(ptr, type, member) container_of(ptr, type, member)

# git grep -n list_entry | wc -l
3636

rb_entry() will probably make its way everywhere.



Powered by blists - more mailing lists