Skip to contentSkip to conversation

Make x86_setup_jump_back_entry() static with a void argument list

PATCH New Simon Horman 1 participant 1 message Nov 3, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make x86_setup_jump_back_entry() static with a void argument list

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.

---

# 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
purgatory/arch/i386/purgatory-x86.c +6 -8
Index: kexec-tools/purgatory/arch/i386/purgatory-x86.c
===================================================================
@@ -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);
-}

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec