Re: [PATCH -tip] x86: mm/pat.c pat_disable should be static

From: Sam Ravnborg
Date: Sat Apr 11 2009 - 04:04:17 EST


On Sat, Apr 11, 2009 at 01:24:53PM +0530, Jaswinder Singh Rajput wrote:
> Impact: reduce kernel size a bit, avoid sparse warning
>
> Fixes sparse warning:
> arch/x86/mm/pat.c:34:16: warning: symbol 'pat_disable' was not declared. Should it be static?
>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@xxxxxxxxx>
> ---
> arch/x86/mm/pat.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
> index cc5e0e2..bc53d8d 100644
> --- a/arch/x86/mm/pat.c
> +++ b/arch/x86/mm/pat.c
> @@ -31,7 +31,7 @@
> #ifdef CONFIG_X86_PAT
> int __read_mostly pat_enabled = 1;
>
> -void __cpuinit pat_disable(const char *reason)
> +static void __cpuinit pat_disable(const char *reason)
> {
> pat_enabled = 0;
> printk(KERN_INFO "%s\n", reason);

This is fixed in a better way.
See Marcin's patch: http://lkml.org/lkml/2009/4/10/384

If you had looked carefully at the call-sites you would have noticed that not all
of them were annotated __cpunint/__init.

Sam
--
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/