[PATCH 2/2] powerpc: Move local setup.h declarations to arch includes

Michael Ellerman michael at ellerman.id.au
Mon Oct 28 12:28:19 EST 2013


On Fri, Oct 25, 2013 at 02:25:07PM -0500, Robert C Jennings wrote:
> Move the few declarations from arch/powerpc/kernel/setup.h
> into arch/powerpc/include/asm/setup.h.  This resolves a
> sparse warning for arch/powerpc/mm/numa.c which defines
> do_init_bootmem() but can't include the setup.h header
> in the prior path.
> 
> Resolves:
> arch/powerpc/mm/numa.c:998:13:
>         warning: symbol 'do_init_bootmem' was not declared.
>                  Should it be static?

There's always a tension between too many well-focused-micro-headers,
and too few random-piles-of-junk headers. I tend towards the former, but
in this case I think you're right to drop setup.h.

> diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
> index d3ca855..5e24df0 100644
> --- a/arch/powerpc/include/asm/setup.h
> +++ b/arch/powerpc/include/asm/setup.h
> @@ -23,6 +23,11 @@ extern void reloc_got2(unsigned long);
>  
>  #define PTRRELOC(x)	((typeof(x)) add_reloc_offset((unsigned long)(x)))
>  
> +extern void check_for_initrd(void);
> +extern void do_init_bootmem(void);
> +extern void setup_panic(void);
> +extern int do_early_xmon;

I don't see do_early_xmon used anywhere? Looks like I forgot to clean it
up in 47679283. Mind dropping it?

I think these days it's trendy to not use extern in headers.

cheers


More information about the Linuxppc-dev mailing list