From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
darren@dvhart.com, fweisbec@gmail.com, oleg@redhat.com,
sbw@mit.edu, Uma Sharma <uma.sharma523@gmail.com>
Subject: Re: [PATCH tip/core/rcu 1/1] rcu: Variable name changed in tree_plugin.h and used in tree.c
Date: Wed, 14 May 2014 08:57:06 -0700 [thread overview]
Message-ID: <20140514155706.GG4570@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140514154150.GA1873@thin>
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@gmail.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;
Of course, now I don't recall the details or the kernel version, other
than that the name change cleared things up. :-/
> 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. ;-)
Thanx, Paul
next prev parent reply other threads:[~2014-05-14 15:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 0:30 [PATCH tip/core/rcu 1/1] rcu: Variable name changed in tree_plugin.h and used in tree.c Paul E. McKenney
2014-05-14 15:41 ` Josh Triplett
2014-05-14 15:48 ` Randy Dunlap
2014-05-14 15:57 ` Paul E. McKenney [this message]
2014-05-14 18:52 ` Josh Triplett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140514155706.GG4570@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=darren@dvhart.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=niv@us.ibm.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sbw@mit.edu \
--cc=tglx@linutronix.de \
--cc=uma.sharma523@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.