[PATCH] Make x86_setup_jump_back_entry() static with a void argument list
Simon Horman
horms at verge.net.au
Mon Nov 3 17:26:02 EST 2008
gcc complains because x86_setup_jump_back_entry() has no arguments,
making the argument list void resolves this.
Also, make the function static as it isn't used in any other files.
And move the function above where it is used, to eliminate the
need for a forward-declaration.
Signed-off-by: Simon Horman <horms at verge.net.au>
---
# gcc --version
gcc (Debian 4.3.2-1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# make
...
gcc -Wall -O2 -fomit-frame-pointer -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -Os -fno-builtin -ffreestanding -I./purgatory/include -I./purgatory/arch/i386/include -I./util_lib/include -I/usr/lib/gcc/i486-linux-gnu/4.3.2/include -c -MD -o purgatory/arch/i386/purgatory-x86.o purgatory/arch/i386/purgatory-x86.c
purgatory/arch/i386/purgatory-x86.c:45: warning: function declaration isn’t
a prototype
purgatory/arch/i386/purgatory-x86.c:55: warning: function declaration isn’t
a prototype
Index: kexec-tools/purgatory/arch/i386/purgatory-x86.c
===================================================================
--- kexec-tools.orig/purgatory/arch/i386/purgatory-x86.c 2008-11-04 09:05:51.000000000 +1100
+++ kexec-tools/purgatory/arch/i386/purgatory-x86.c 2008-11-04 09:06:06.000000000 +1100
@@ -42,7 +42,12 @@ void setup_arch(void)
/* if (legacy_timer) x86_setup_legacy_timer(); */
}
-extern void x86_setup_jump_back_entry();
+static void x86_setup_jump_back_entry(void)
+{
+ if (cmdline_end)
+ sprintf(cmdline_end, " kexec_jump_back_entry=0x%x",
+ jump_back_entry);
+}
/* This function can be used to execute after the SHA256 verification. */
void post_verification_setup_arch(void)
@@ -50,10 +55,3 @@ void post_verification_setup_arch(void)
if (panic_kernel) crashdump_backup_memory();
if (jump_back_entry) x86_setup_jump_back_entry();
}
-
-void x86_setup_jump_back_entry()
-{
- if (cmdline_end)
- sprintf(cmdline_end, " kexec_jump_back_entry=0x%x",
- jump_back_entry);
-}
More information about the kexec
mailing list