Re: checkpatch and kernel/sched.c

From: Ingo Molnar
Date: Mon Oct 01 2007 - 06:37:30 EST



* Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> > > WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> > > #411: FILE: home/apw/git/linux-2.6/kernel/sched.c:408:
> > > +EXPORT_SYMBOL_GPL(cpu_clock);
> >
> > yes, this is a legit warning and i fix it every time i see it. (I
> > cannot fix this one now because mainline does not have an
> > EXPORT_SYMBOL_GPL for cpu_clock(), it's added in -mm? But i cannot
> > find it in mm either. I'll fix it once i find the patch :)
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc8/2.6.23-rc8-mm2/broken-out/make-rcutorture-rng-use-temporal-entropy.patch

ok - i have picked up the sched.c bit for sched-devel.git. (see below)

Ingo

---------------->
Subject: sched: export cpu_clock()
From: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>

export cpu_clock() - the preferred API instead of sched_clock().

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/sched.c | 1 +
1 file changed, 1 insertion(+)

Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -469,6 +469,7 @@ unsigned long long cpu_clock(int cpu)

return now;
}
+EXPORT_SYMBOL_GPL(cpu_clock);

#ifndef prepare_arch_switch
# define prepare_arch_switch(next) do { } while (0)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/