* [PATCH] lguest: include function prototypes
@ 2008-02-13 21:14 Harvey Harrison
2008-02-17 14:02 ` Thomas Gleixner
2008-03-04 1:34 ` Rusty Russell
0 siblings, 2 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-02-13 21:14 UTC (permalink / raw)
To: rusty@rustcorp.com.au; +Cc: Ingo Molnar, LKML
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.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
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
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(-)
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 5afdde4..1e613fb 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -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,
diff --git a/include/asm-x86/lguest.h b/include/asm-x86/lguest.h
index 4d9367b..9b17571 100644
--- a/include/asm-x86/lguest.h
+++ b/include/asm-x86/lguest.h
@@ -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. */
--
1.5.4.1.1278.gc75be
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lguest: include function prototypes
2008-02-13 21:14 [PATCH] lguest: include function prototypes Harvey Harrison
@ 2008-02-17 14:02 ` Thomas Gleixner
2008-03-04 1:34 ` Rusty Russell
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2008-02-17 14:02 UTC (permalink / raw)
To: Harvey Harrison; +Cc: rusty@rustcorp.com.au, Ingo Molnar, LKML
On Wed, 13 Feb 2008, 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.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
Applied. Thanks,
tglx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lguest: include function prototypes
2008-02-13 21:14 [PATCH] lguest: include function prototypes Harvey Harrison
2008-02-17 14:02 ` Thomas Gleixner
@ 2008-03-04 1:34 ` Rusty Russell
1 sibling, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2008-03-04 1:34 UTC (permalink / raw)
To: Harvey Harrison; +Cc: Ingo Molnar, LKML
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.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
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-04 1:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 21:14 [PATCH] lguest: include function prototypes Harvey Harrison
2008-02-17 14:02 ` Thomas Gleixner
2008-03-04 1:34 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox