public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] UML: Fix another build error
@ 2008-04-12 15:39 WANG Cong
  2008-04-14 15:43 ` Jeff Dike
  0 siblings, 1 reply; 5+ 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: Text/Plain; charset=utf-8, Size: 1610 bytes --]


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

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [Patch] uml: fix another build error
@ 2008-07-22 17:41 WANG Cong
  2008-07-23 15:48 ` Jeff Dike
  0 siblings, 1 reply; 5+ 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");

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

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

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox