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] [day] [month] [year] [list]
Message-ID: <20140514185239.GA4475@jtriplet-mobl1>
Date:	Wed, 14 May 2014 11:52:39 -0700
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org,
	laijs@...fujitsu.com, dipankar@...ibm.com,
	akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
	niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
	darren@...art.com, fweisbec@...il.com, oleg@...hat.com,
	sbw@....edu, Uma Sharma <uma.sharma523@...il.com>
Subject: Re: [PATCH tip/core/rcu 1/1] rcu: Variable name changed in
 tree_plugin.h and used in tree.c

On Wed, May 14, 2014 at 08:57:06AM -0700, Paul E. McKenney wrote:
> On Wed, May 14, 2014 at 08:41:50AM -0700, Josh Triplett wrote:
> > On Tue, May 13, 2014 at 05:30:59PM -0700, Paul E. McKenney wrote:
> > > From: Uma Sharma <uma.sharma523@...il.com>
> > > 
> > > The variable and struct both having the name "rcu_state" confuses
> > > sparse in some situations, so this commit changes the variable to
> > > "rcu_state_p" in order to avoid this confusion.  This also makes
> > > things easier for human readers.
> > 
> > Human readers aside, how does Sparse get confused?  Let's fix that.
> 
> OK.  The issue appears to be that we have a variable with the same
> name as a struct, as in:
> 
> struct rcu_state *rcu_state;

Which is completely legal C, and Sparse should have no issue with it.

> > Personally, I don't think the _p makes things particularly easier for
> > human readers, but it doesn't make things *harder* for anyone other than
> > those used to reading the existing code, so, *shrug*.
> 
> It does make it a bit easier for me when grepping through the source,
> given the large number of "struct rcu_state" strings in there.  And
> yes, I should be using some more modern tools than "grep" and "cscope"!
> But I am not the only throwback.  ;-)

Count me in as someone using "grep" as well (usually via "git grep").

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ