All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [Patch] UML: Fix another build error
@ 2008-04-12 15:39 ` WANG Cong
  0 siblings, 0 replies; 8+ messages in thread
From: WANG Cong @ 2008-04-12 15:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Jeff Dike, user-mode-linux-devel


This patch fixes the following build error.

  CC      arch/um/drivers/mconsole_kern.o
/home/wangcong/projects/linux-2.6/arch/um/drivers/mconsole_kern.c:337: error: redefinition of ‘mconsole_register_dev’
/home/wangcong/projects/linux-2.6/arch/um/include/mconsole_kern.h:47: error: previous definition of ‘mconsole_register_dev’ was here
make[2]: *** [arch/um/drivers/mconsole_kern.o] Error 1
make[1]: *** [arch/um/drivers/mconsole_kern.ko] Error 2
make: *** [sub-make] Error 2

Compile testing passed.

Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: WANG Cong <wangcong@zeuux.org>

---
 arch/um/drivers/mconsole_kern.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 19d579d..e94ccb8 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -330,9 +330,12 @@ void mconsole_stop(struct mc_request *req)
 	mconsole_reply(req, "", 0, 0);
 }
 
-static DEFINE_SPINLOCK(mc_devices_lock);
 static LIST_HEAD(mconsole_devices);
 
+#ifdef CONFIG_MCONSOLE
+
+static DEFINE_SPINLOCK(mc_devices_lock);
+
 void mconsole_register_dev(struct mc_device *new)
 {
 	spin_lock(&mc_devices_lock);
@@ -340,6 +343,7 @@ void mconsole_register_dev(struct mc_device *new)
 	list_add(&new->list, &mconsole_devices);
 	spin_unlock(&mc_devices_lock);
 }
+#endif
 
 static struct mc_device *mconsole_find_dev(char *name)
 {
-- 
1.5.2.4

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [uml-devel] [Patch] uml: fix another build error
@ 2008-07-22 17:41 WANG Cong
  2008-07-23 15:48 ` Jeff Dike
  0 siblings, 1 reply; 8+ messages in thread
From: WANG Cong @ 2008-07-22 17:41 UTC (permalink / raw)
  To: LKML; +Cc: jdike, user-mode-linux-devel


Fixed this error:

  CC      arch/um/drivers/vde_user.o
  /home/wangcong/Projects/linux-2.6/arch/um/drivers/vde_user.c: In
function ‘vde_init_libstuff’:
/home/wangcong/Projects/linux-2.6/arch/um/drivers/vde_user.c:81:
error: implicit declaration of function ‘kmalloc’
/home/wangcong/Projects/linux-2.6/arch/um/drivers/vde_user.c:81:
warning: assignment makes pointer from integer without a cast
make[2]: *** [arch/um/drivers/vde_user.o] Error 1
make[1]: *** [arch/um/drivers/vde_user.ko] Error 2
make: *** [sub-make] Error 2

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: jdike@addtoit.com

---
diff --git a/arch/um/drivers/vde_user.c b/arch/um/drivers/vde_user.c
index 56533db..744eacf 100644
--- a/arch/um/drivers/vde_user.c
+++ b/arch/um/drivers/vde_user.c
@@ -78,7 +78,7 @@ void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init)
 {
 	struct vde_open_args *args;
 
-	vpri->args = kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL);
+	vpri->args = uml_kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL);
 	if (vpri->args == NULL) {
 		printk(UM_KERN_ERR "vde_init_libstuff - vde_open_args "
 		       "allocation failed");

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-07-23 15:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-12 15:39 [uml-devel] [Patch] UML: Fix another build error WANG Cong
2008-04-12 15:39 ` WANG Cong
2008-04-14 15:43 ` [uml-devel] " Jeff Dike
2008-04-14 15:43   ` Jeff Dike
2008-04-16  5:41   ` [uml-devel] " WANG Cong
2008-04-16  5:41     ` WANG Cong
  -- strict thread matches above, loose matches on Subject: below --
2008-07-22 17:41 [uml-devel] [Patch] uml: fix " WANG Cong
2008-07-23 15:48 ` Jeff Dike

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.