* [PATCH] define setup_arch() in header file
@ 2006-03-05 20:44 Ben Dooks
2006-03-06 7:03 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2006-03-05 20:44 UTC (permalink / raw)
To: linux-kernel; +Cc: ben
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
When running sparse over an ARM build of 2.6.16-rc5, I came
across this error, which is due to setup_arch() being used
be init/main.c, but not being defined in any headers.
This patch adds setup_arch() definition to include/linux/init.h
The warning is:
arch/arm/kernel/setup.c:730:13: warning: symbol 'setup_arch' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
[-- Attachment #2: setup-define-archcall.patch --]
[-- Type: text/plain, Size: 490 bytes --]
diff -urpN -X ../dontdiff linux-2.6.16-rc5/include/linux/init.h linux-2.6.16-rc5-fixes/include/linux/init.h
--- linux-2.6.16-rc5/include/linux/init.h 2006-02-28 09:05:02.000000000 +0000
+++ linux-2.6.16-rc5-fixes/include/linux/init.h 2006-03-05 20:39:21.000000000 +0000
@@ -69,6 +69,10 @@ extern initcall_t __security_initcall_st
/* Defined in init/main.c */
extern char saved_command_line[];
+
+/* used by init/main.c */
+extern void setup_arch(char **);
+
#endif
#ifndef MODULE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] define setup_arch() in header file
2006-03-05 20:44 [PATCH] define setup_arch() in header file Ben Dooks
@ 2006-03-06 7:03 ` Andrew Morton
2006-03-09 1:28 ` [2.6 patch] add a proper prototype for setup_arch() Adrian Bunk
2006-03-14 0:45 ` [PATCH] define setup_arch() in header file Paul Mackerras
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Morton @ 2006-03-06 7:03 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-kernel, ben
Ben Dooks <ben-linux@fluff.org> wrote:
>
> When running sparse over an ARM build of 2.6.16-rc5, I came
> across this error, which is due to setup_arch() being used
> be init/main.c, but not being defined in any headers.
>
> This patch adds setup_arch() definition to include/linux/init.h
>
> The warning is:
> arch/arm/kernel/setup.c:730:13: warning: symbol 'setup_arch' was not declared. Should it be static?
>
> ...
>
> --- linux-2.6.16-rc5/include/linux/init.h 2006-02-28 09:05:02.000000000 +0000
> +++ linux-2.6.16-rc5-fixes/include/linux/init.h 2006-03-05 20:39:21.000000000 +0000
> @@ -69,6 +69,10 @@ extern initcall_t __security_initcall_st
>
> /* Defined in init/main.c */
> extern char saved_command_line[];
> +
> +/* used by init/main.c */
> +extern void setup_arch(char **);
There are already declarations of setup_arch in include/asm-ppc and
include/asm-powerpc. Different declarations.
Plus there's an unneeded-with-this-patch declaration in init/main.c.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [2.6 patch] add a proper prototype for setup_arch()
2006-03-06 7:03 ` Andrew Morton
@ 2006-03-09 1:28 ` Adrian Bunk
2006-03-14 0:45 ` [PATCH] define setup_arch() in header file Paul Mackerras
1 sibling, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-03-09 1:28 UTC (permalink / raw)
To: Andrew Morton; +Cc: Ben Dooks, linux-kernel, ben
On Sun, Mar 05, 2006 at 11:03:21PM -0800, Andrew Morton wrote:
> Ben Dooks <ben-linux@fluff.org> wrote:
> >
> > When running sparse over an ARM build of 2.6.16-rc5, I came
> > across this error, which is due to setup_arch() being used
> > be init/main.c, but not being defined in any headers.
> >
> > This patch adds setup_arch() definition to include/linux/init.h
> >
> > The warning is:
> > arch/arm/kernel/setup.c:730:13: warning: symbol 'setup_arch' was not declared. Should it be static?
> >
> > ...
> >
> > --- linux-2.6.16-rc5/include/linux/init.h 2006-02-28 09:05:02.000000000 +0000
> > +++ linux-2.6.16-rc5-fixes/include/linux/init.h 2006-03-05 20:39:21.000000000 +0000
> > @@ -69,6 +69,10 @@ extern initcall_t __security_initcall_st
> >
> > /* Defined in init/main.c */
> > extern char saved_command_line[];
> > +
> > +/* used by init/main.c */
> > +extern void setup_arch(char **);
>
> There are already declarations of setup_arch in include/asm-ppc and
> include/asm-powerpc. Different declarations.
These are struct members, not function prototypes.
> Plus there's an unneeded-with-this-patch declaration in init/main.c.
Updated patch below.
cu
Adrian
<-- snip -->
This patch adds a proper prototype for setup_arch() in init.h .
This patch is based on a patch by Ben Dooks <ben-linux@fluff.org>.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
include/linux/init.h | 4 ++++
init/main.c | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
--- linux-2.6.16-rc5-mm3-full/include/linux/init.h.old 2006-03-08 23:32:22.000000000 +0100
+++ linux-2.6.16-rc5-mm3-full/include/linux/init.h 2006-03-08 23:32:26.000000000 +0100
@@ -69,6 +69,10 @@
/* Defined in init/main.c */
extern char saved_command_line[];
+
+/* used by init/main.c */
+extern void setup_arch(char **);
+
#endif
#ifndef MODULE
--- linux-2.6.16-rc5-mm3-full/init/main.c.old 2006-03-08 23:35:40.000000000 +0100
+++ linux-2.6.16-rc5-mm3-full/init/main.c 2006-03-08 23:35:45.000000000 +0100
@@ -324,8 +324,6 @@
}
__setup("rdinit=", rdinit_setup);
-extern void setup_arch(char **);
-
#ifndef CONFIG_SMP
#ifdef CONFIG_X86_LOCAL_APIC
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] define setup_arch() in header file
2006-03-06 7:03 ` Andrew Morton
2006-03-09 1:28 ` [2.6 patch] add a proper prototype for setup_arch() Adrian Bunk
@ 2006-03-14 0:45 ` Paul Mackerras
1 sibling, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2006-03-14 0:45 UTC (permalink / raw)
To: Andrew Morton; +Cc: Ben Dooks, linux-kernel, ben
Andrew Morton writes:
> There are already declarations of setup_arch in include/asm-ppc and
> include/asm-powerpc. Different declarations.
There are? Grep doesn't show them to me.
Paul.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-03-14 0:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-05 20:44 [PATCH] define setup_arch() in header file Ben Dooks
2006-03-06 7:03 ` Andrew Morton
2006-03-09 1:28 ` [2.6 patch] add a proper prototype for setup_arch() Adrian Bunk
2006-03-14 0:45 ` [PATCH] define setup_arch() in header file Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).