From: Carlo Marcelo Arenas Belon <carenas-kLeDWSohozoJb6fo7hG9ng@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: Bernhard Kaindl <bk-l3A5Bk7waGM@public.gmane.org>,
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH 1/2] testsuite: make smp_init parameter be a function that returns int
Date: Thu, 31 Jan 2008 06:18:22 -0600 [thread overview]
Message-ID: <20080131121822.GA19248@tapir> (raw)
In-Reply-To: <20080131121546.GB15355@tapir>
Fixes :
test/x86/access.c:577: warning: passing argument 1 of 'smp_init' from
incompatible pointer type
Signed-off-by: Carlo Marcelo Arenas Belon <carenas-kLeDWSohozoJb6fo7hG9ng@public.gmane.org>
---
user/test/x86/lib/smp.c | 4 ++--
user/test/x86/lib/smp.h | 2 +-
user/test/x86/smptest.c | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/user/test/x86/lib/smp.c b/user/test/x86/lib/smp.c
index a4cbe61..84ab163 100644
--- a/user/test/x86/lib/smp.c
+++ b/user/test/x86/lib/smp.c
@@ -125,7 +125,7 @@ void on_cpu(int cpu, void (*function)(void *data), void *data)
spin_unlock(&ipi_lock);
}
-static void (*smp_main_func)(void);
+static int (*smp_main_func)(void);
static volatile int smp_main_running;
asm ("smp_init_entry: \n"
@@ -133,7 +133,7 @@ asm ("smp_init_entry: \n"
"sti \n"
"call *smp_main_func");
-void smp_init(void (*smp_main)(void))
+void smp_init(int (*smp_main)(void))
{
int i;
void smp_init_entry(void);
diff --git a/user/test/x86/lib/smp.h b/user/test/x86/lib/smp.h
index bcf76a3..1ee0cb0 100644
--- a/user/test/x86/lib/smp.h
+++ b/user/test/x86/lib/smp.h
@@ -5,7 +5,7 @@ struct spinlock {
int v;
};
-void smp_init(void (*smp_main)(void));
+void smp_init(int (*smp_main)(void));
int cpu_count(void);
int smp_id(void);
diff --git a/user/test/x86/smptest.c b/user/test/x86/smptest.c
index f6ef3e9..c16afd5 100644
--- a/user/test/x86/smptest.c
+++ b/user/test/x86/smptest.c
@@ -11,11 +11,12 @@ static void ipi_test(void *data)
printf("but wrong cpu %d\n", smp_id());
}
-static void smp_main(void)
+static int smp_main(void)
{
printf("smp main %d\n", smp_id());
while (1)
asm volatile ("hlt" : : : "memory");
+ return 0;
}
int main()
--
1.5.3.7
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-01-31 12:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 16:06 [PATCH] kvm: testsuite: silence warnings on x86_64 Bernhard Kaindl
[not found] ` <alpine.LNX.1.00.0801241628040.5231-aORvohZ8rX8NvFgr0RP9cw@public.gmane.org>
2008-01-24 16:21 ` Avi Kivity
[not found] ` <4798BB24.9080100-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-24 17:43 ` Bernhard Kaindl
[not found] ` <alpine.LNX.1.00.0801241808470.5231-aORvohZ8rX8NvFgr0RP9cw@public.gmane.org>
2008-01-27 7:15 ` Avi Kivity
2008-01-31 10:23 ` Carlo Marcelo Arenas Belon
2008-01-31 10:38 ` Avi Kivity
2008-01-31 10:45 ` Avi Kivity
[not found] ` <47A1A6DB.6080804-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-31 12:15 ` [PATCH 0/2] testsuite: fixes for smp compilation issues Carlo Marcelo Arenas Belon
2008-01-31 12:18 ` Carlo Marcelo Arenas Belon [this message]
2008-01-31 12:20 ` [PATCH 2/2] testsuite: fix building smp.flat Carlo Marcelo Arenas Belon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080131121822.GA19248@tapir \
--to=carenas-kledwsohozojb6fo7hg9ng@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=bk-l3A5Bk7waGM@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.