From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andy Whitcroft <apw@canonical.com>,
linux-kernel@vger.kernel.org, laijs@cn.fujitsu.com,
dipankar@in.ibm.com, akpm@linux-foundation.org,
mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org,
dvhltc@us.ibm.com, niv@us.ibm.com, tglx@linutronix.de,
peterz@infradead.org, rostedt@goodmis.org,
Valdis.Kletnieks@vt.edu
Subject: Re: [PATCH tip/core/rcu] RCU whitespace fixes
Date: Sat, 19 Sep 2009 14:15:52 -0700 [thread overview]
Message-ID: <20090919211552.GB6674@linux.vnet.ibm.com> (raw)
In-Reply-To: <20090919070552.GB17617@elte.hu>
On Sat, Sep 19, 2009 at 09:05:52AM +0200, Ingo Molnar wrote:
>
> * Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
>
> > Fix a number of whitespace ^Ierrors in the include/linux/rcu* and the
> > kernel/rcu* files.
> >
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > ---
> >
> > include/linux/rculist_nulls.h | 2 +-
> > include/linux/rcupdate.h | 6 +++---
> > include/linux/rcutree.h | 2 +-
> > kernel/rcupdate.c | 4 ++--
> > kernel/rcutorture.c | 4 ++--
> > kernel/rcutree.c | 2 +-
> > kernel/rcutree.h | 2 +-
> > kernel/rcutree_plugin.h | 4 ++--
> > kernel/rcutree_trace.c | 2 +-
> > 9 files changed, 14 insertions(+), 14 deletions(-)
>
> thanks Paul - i also did a few more checkpatch trivial fixes to create a
> clean baseline.
Many thanks!!!
And I have added --patch to my "git format-patch script".
> Here's a full list of the remaining 'problems' in kernel/rcu*.[ch] files
> checked via checkpatch --file kernel/rcu*.[ch] , with annotations by me
> that suggest resolutions:
Thank you for looking this over -- I clearly need to get checkpatch
back into my workflow. :-/
I will resolve these after I finish getting rcutiny forward-ported and
shrunk a bit further. The rcutiny work is critically needed to repair
a rent in the space-time continuum... :-)
Thanx, Paul
> [ Andy: see one checkpatch bug mentioned below. Plus it would be
> _really_ nice if line 80 warnings would only be emitted if the line
> also contains 2 or more tabs - i.e. excessive nesting. Longer than 100
> lines should be warned about unconditionally. ]
>
> -----------------------
> WARNING: externs should be avoided in .c files
> #262: FILE: rcupdate.c:262:
> +extern int rcu_cpu_notify(struct notifier_block *self,
>
> -----------------------> Move rcu_cpu_notify() prototype to rcutree.h?
>
> WARNING: line over 80 characters
> #87: FILE: rcutorture.c:87:
> + do { printk(KERN_ALERT "%s" TORTURE_FLAG s "\n", torture_type); } while (0)
>
> -----------------------> Ignore.
>
> WARNING: line over 80 characters
> #89: FILE: rcutorture.c:89:
> + do { if (verbose) printk(KERN_ALERT "%s" TORTURE_FLAG s "\n", torture_type); } while (0)
>
> -----------------------> Ignore.
>
> WARNING: line over 80 characters
> #91: FILE: rcutorture.c:91:
> + do { if (verbose) printk(KERN_ALERT "%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0)
>
> -----------------------> Ignore.
>
> WARNING: line over 80 characters
> #247: FILE: rcutorture.c:247:
> + schedule_timeout_interruptible(round_jiffies_relative(HZ));
>
> -----------------------> Ignore.
>
> WARNING: externs should be avoided in .c files
> #609: FILE: rcutorture.c:609:
> +extern int rcu_expedited_torture_stats(char *page);
>
> -----------------------> Move rcu_expedited_torture_stats() prototype to sched.h?
>
> CHECK: memory barrier without comment
> #653: FILE: rcutorture.c:653:
> + smp_wmb();
>
> -----------------------> Add comment?
>
> WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> #56: FILE: rcutree.c:56:
> +EXPORT_SYMBOL_GPL(rcu_lock_map);
>
> -----------------------> checkpatch.pl bug?
>
> WARNING: externs should be avoided in .c files
> #84: FILE: rcutree.c:84:
> +extern long rcu_batches_completed_sched(void);
>
> -----------------------> Move rcu_batches_completed_sched() to sched.h?
>
> WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc
> #1498: FILE: rcutree.c:1498:
> + cprv = NR_CPUS;
>
> -----------------------> Ignore.
>
> WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc
> #1535: FILE: rcutree.c:1535:
> + if (rnp->grphi >= NR_CPUS)
>
> -----------------------> Ignore.
>
> WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc
> #1536: FILE: rcutree.c:1536:
> + rnp->grphi = NR_CPUS - 1;
>
> -----------------------> Ignore.
>
> WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc
> #48: FILE: rcutree.h:48:
> +#elif NR_CPUS <= RCU_FANOUT_SQ
>
> -----------------------> Ignore.
>
> WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc
> #54: FILE: rcutree.h:54:
> +#elif NR_CPUS <= RCU_FANOUT_CUBE
>
> -----------------------> Ignore.
>
> CHECK: spinlock_t definition without comment
> #82: FILE: rcutree.h:82:
> + spinlock_t lock;
>
> -----------------------> Add comment?
>
> WARNING: struct file_operations should normally be const
> #96: FILE: rcutree_trace.c:96:
> +static struct file_operations rcudata_fops = {
>
> -----------------------> Add const?
>
> WARNING: struct file_operations should normally be const
> #148: FILE: rcutree_trace.c:148:
> +static struct file_operations rcudata_csv_fops = {
>
> -----------------------> Add const?
>
> ERROR: code indent should use tabs where possible
> #162: FILE: rcutree_trace.c:162:
> +^I "nfqs=%lu/nfqsng=%lu(%lu) fqlh=%lu\n",$
>
> -----------------------> s/ /^T/
>
> WARNING: struct file_operations should normally be const
> #199: FILE: rcutree_trace.c:199:
> +static struct file_operations rcuhier_fops = {
>
> -----------------------> Add const?
>
> WARNING: struct file_operations should normally be const
> #225: FILE: rcutree_trace.c:225:
> +static struct file_operations rcugp_fops = {
>
> -----------------------> Add const?
>
> WARNING: struct file_operations should normally be const
> #279: FILE: rcutree_trace.c:279:
> +static struct file_operations rcu_pending_fops = {
>
> -----------------------> Add const?
>
> Thanks,
>
> Ingo
next prev parent reply other threads:[~2009-09-19 21:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 17:28 [PATCH tip/core/rcu] RCU whitespace fixes Paul E. McKenney
2009-09-19 7:05 ` Ingo Molnar
2009-09-19 21:15 ` Paul E. McKenney [this message]
2009-09-19 7:59 ` [tip:core/urgent] rcu: Fix whitespace inconsistencies tip-bot for Paul E. McKenney
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=20090919211552.GB6674@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=dipankar@in.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox