2008-06-30 22:19:48

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] make kvm_smp_prepare_boot_cpu() static

This patch makes the needlessly global kvm_smp_prepare_boot_cpu() static.

Signed-off-by: Adrian Bunk <[email protected]>

---
a03ee2a21c4e40483712d453a4f803980186c59f
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index 87edf1c..d02def0 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -113,7 +113,7 @@ static void kvm_setup_secondary_clock(void)
#endif

#ifdef CONFIG_SMP
-void __init kvm_smp_prepare_boot_cpu(void)
+static void __init kvm_smp_prepare_boot_cpu(void)
{
WARN_ON(kvm_register_clock("primary cpu clock"));
native_smp_prepare_boot_cpu();


2008-07-01 06:49:26

by Gerd Hoffmann

[permalink] [raw]
Subject: -Wmissing-prototypes (was: make foo() static)

Adrian Bunk wrote:

> This patch makes the needlessly global kvm_smp_prepare_boot_cpu() static.

Hmm, maybe we should build the kernel with -Wmissing-prototypes?
That should make gcc print a warning for that ...

cheers,
Gerd

--
http://kraxel.fedorapeople.org/xenner/

2008-07-01 07:18:06

by Adrian Bunk

[permalink] [raw]
Subject: Re: -Wmissing-prototypes (was: make foo() static)

On Tue, Jul 01, 2008 at 08:42:59AM +0200, Gerd Hoffmann wrote:
> Adrian Bunk wrote:
>
> > This patch makes the needlessly global kvm_smp_prepare_boot_cpu() static.
>
> Hmm, maybe we should build the kernel with -Wmissing-prototypes?
> That should make gcc print a warning for that ...

I started 3 or 4 years ago cleaning up the kernel for
-Wmissing-prototypes and I'm still working on it.

Many parts of the kernel now compile cleanly or nearly cleanly, but
looking at e.g. arch/ I know what kind of answers I would get if
suggesting adding -Wmissing-prototypes today...

> cheers,
> Gerd

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2008-07-05 11:14:09

by Avi Kivity

[permalink] [raw]
Subject: Re: [2.6 patch] make kvm_smp_prepare_boot_cpu() static

Adrian Bunk wrote:
> This patch makes the needlessly global kvm_smp_prepare_boot_cpu() static.
>
>

Applied, thanks.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.