[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20110609000348.GQ2324@linux.vnet.ibm.com>
Date: Wed, 8 Jun 2011 17:03:48 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
dipankar@...ibm.com, akpm@...ux-foundation.org,
josh@...htriplett.org, niv@...ibm.com, tglx@...utronix.de,
peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
patches@...aro.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH tip/core/rcu 07/28] Fix mismatched variable in
rcutree_trace.c
On Wed, Jun 08, 2011 at 07:23:29PM -0400, Mathieu Desnoyers wrote:
> * Paul E. McKenney (paulmck@...ux.vnet.ibm.com) wrote:
> > From: Andi Kleen <ak@...ux.intel.com>
> >
> > rcutree.c defines rcu_cpu_kthread_cpu as int, not unsigned int,
> > so the extern has to follow that.
>
> How comes this discrepancy was made possible in the first place ? This
> declaration should appear in a header included by both rcutree_trace.c
> and rcutree.c, which would have permitted the compiler to detect this.
>
> Maybe kernel/rcutree.h would be a good location for these ?
I vaguely recall a time where this didn't work, but will give it
another try. It would certainly be nicer if the compiler checked
for these sorts of mismatches!
Thanx, Paul
> Mathieu
>
> >
> > Cc: paulmck@...ux.vnet.ibm.com
> > Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> > Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> > ---
> > kernel/rcutree_trace.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
> > index 9678cc3..91c56e5 100644
> > --- a/kernel/rcutree_trace.c
> > +++ b/kernel/rcutree_trace.c
> > @@ -47,7 +47,7 @@
> > #include "rcutree.h"
> >
> > DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_status);
> > -DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_cpu);
> > +DECLARE_PER_CPU(int, rcu_cpu_kthread_cpu);
> > DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_loops);
> > DECLARE_PER_CPU(char, rcu_cpu_has_work);
> >
> > --
> > 1.7.3.2
> >
>
> --
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com
--
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