Re: checkpatch and kernel/sched.c

Ingo Molnar
2007-10-01T10:37:27Z

* Andrew Morton <akpm@linux-foundation.org> 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@linux.vnet.ibm.com>

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

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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)