lguest: include function prototypes
PATCH 1/1 lguest: include function prototypes
Fix for sparse warningarch/x86/lguest/boot.c:939:13: warning: symbol 'lguest_init' was not declared. Should it be static?
Added a declaration to asm-x86/lguest.h and moved the extern arrays there as well. As an alternative to including asm/lguest.h directly, an include could be put in linux/lguest.h
---
Rusty, just a suggestion. If you'd like Ingo to take it in the x86 tree, please let him know.
arch/x86/lguest/boot.c | 10 +--------- include/asm-x86/lguest.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-)
arch/x86/lguest/boot.c +1 -9
@@ -57,6 +57,7 @@#include <linux/lguest_launcher.h> #include <linux/virtio_console.h> #include <linux/pm.h> +#include <asm/lguest.h> #include <asm/paravirt.h> #include <asm/param.h> #include <asm/page.h>
@@ -75,15 +76,6 @@* behaving in simplified but equivalent ways. In particular, the Guest is the * same kernel as the Host (or at least, built from the same source code). :*/ -/* Declarations for definitions in lguest_guest.S */ -extern char lguest_noirq_start[], lguest_noirq_end[]; -extern const char lgstart_cli[], lgend_cli[]; -extern const char lgstart_sti[], lgend_sti[]; -extern const char lgstart_popf[], lgend_popf[]; -extern const char lgstart_pushf[], lgend_pushf[]; -extern const char lgstart_iret[], lgend_iret[]; -extern void lguest_iret (void ); -struct lguest_data lguest_data = { .hcall_status = { [0 ...LHCALL_RING_SIZE -1 ] =0xFF }, .noirq_start = (u32 )lguest_noirq_start,
include/asm-x86/lguest.h +11 -0
@@ -23,6 +23,17 @@/* Found in switcher.S */ extern unsigned long default_idt_entries[]; +/* Declarations for definitions in lguest_guest.S */ +extern char lguest_noirq_start[], lguest_noirq_end[]; +extern const char lgstart_cli[], lgend_cli[]; +extern const char lgstart_sti[], lgend_sti[]; +extern const char lgstart_popf[], lgend_popf[]; +extern const char lgstart_pushf[], lgend_pushf[]; +extern const char lgstart_iret[], lgend_iret[]; + +extern void lguest_iret (void ); +extern void lguest_init (void ); +struct lguest_regs {/* Manually saved part. */
Signature · 1 line
1.5.4.1.1278.gc75be
Thomas Gleixner
AppliedQuoted 6 lines · Harvey Harrison
Fix for sparse warning
arch/x86/lguest/boot.c:939:13: warning: symbol 'lguest_init' was not declared. Should it be static?Added a declaration to
asm-x86/lguest.hand moved the extern arrays there as well. As an alternative to includingasm/lguest.hdirectly, an include could be put inlinux/lguest.h
Applied. Thanks,
tglx
Quoted 7 lines · On Thursday 14 February 2008 08:14:35 Harvey Harrison wrote:
Fix for sparse warning
arch/x86/lguest/boot.c:939:13: warning: symbol 'lguest_init' was not declared. Should it be static?Added a declaration to
asm-x86/lguest.hand moved the extern arrays there as well. As an alternative to includingasm/lguest.hdirectly, an include could be put inlinux/lguest.h
Hi Harvey,
Thanks for the patch. Currently asm/lguest.h is used for the guest/host
interface definitions, while these are purely in-guest symbols. The standard for these 'used from asm/declared in asm' seems to be to put the declarations in the C file directly.
However, since this has already been applied to Linus' tree, it's fine.
Thanks!
Rusty.