* [uml-devel] [Patch] UML: Fix another build error
@ 2008-04-12 15:39 WANG Cong
2008-04-14 15:43 ` Jeff Dike
0 siblings, 1 reply; 7+ 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] 7+ messages in thread
* Re: [uml-devel] [Patch] UML: Fix another build error
2008-04-12 15:39 [uml-devel] [Patch] UML: Fix " WANG Cong
@ 2008-04-14 15:43 ` Jeff Dike
2008-04-16 5:41 ` WANG Cong
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Dike @ 2008-04-14 15:43 UTC (permalink / raw)
To: WANG Cong; +Cc: akpm, linux-kernel, user-mode-linux-devel
On Sat, Apr 12, 2008 at 11:39:14PM +0800, WANG Cong wrote:
>
> 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
This one is fishy. For one thing, it looks like you reproduce this
with !CONFIG_MCONSOLE, but I just successfully built a
!CONFIG_MCONSOLE UML.
Second, the arch/um/drivers/Makefile looks to me (and the build log
confirms) that mconsole_kern.c isn't compiled with !CONFIG_MCONSOLE.
Third, you should ask yourself if there might be a deeper problem that
needs fixing if you find yourself putting #ifdef CONFIG_FOO in files
which implement FOO.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
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 [flat|nested] 7+ messages in thread
* Re: [uml-devel] [Patch] UML: Fix another build error
2008-04-14 15:43 ` Jeff Dike
@ 2008-04-16 5:41 ` WANG Cong
0 siblings, 0 replies; 7+ messages in thread
From: WANG Cong @ 2008-04-16 5:41 UTC (permalink / raw)
To: jdike; +Cc: akpm, linux-kernel, user-mode-linux-devel
From: Jeff Dike <jdike@addtoit.com>
Date: Mon, 14 Apr 2008 11:43:42 -0400
> On Sat, Apr 12, 2008 at 11:39:14PM +0800, WANG Cong wrote:
> >
> > 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
>
> This one is fishy. For one thing, it looks like you reproduce this
> with !CONFIG_MCONSOLE, but I just successfully built a
> !CONFIG_MCONSOLE UML.
>
> Second, the arch/um/drivers/Makefile looks to me (and the build log
> confirms) that mconsole_kern.c isn't compiled with !CONFIG_MCONSOLE.
>
> Third, you should ask yourself if there might be a deeper problem that
> needs fixing if you find yourself putting #ifdef CONFIG_FOO in files
> which implement FOO.
Thanks for teaching this!
I will try if it's possible to reproduce this.
Cong
-------------------------------------------------------------------------
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 [flat|nested] 7+ messages in thread
* [uml-devel] [Patch] uml: fix another build error
@ 2008-07-22 17:41 ` WANG Cong
0 siblings, 0 replies; 7+ 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] 7+ messages in thread
* [Patch] uml: fix another build error
@ 2008-07-22 17:41 ` WANG Cong
0 siblings, 0 replies; 7+ 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] 7+ messages in thread
* Re: [uml-devel] [Patch] uml: fix another build error
2008-07-22 17:41 ` WANG Cong
@ 2008-07-23 15:48 ` Jeff Dike
-1 siblings, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2008-07-23 15:48 UTC (permalink / raw)
To: WANG Cong; +Cc: LKML, user-mode-linux-devel
On Tue, Jul 22, 2008 at 06:41:52PM +0100, WANG Cong wrote:
>
> 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
Thanks - added to the queue.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
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 [flat|nested] 7+ messages in thread
* Re: [Patch] uml: fix another build error
@ 2008-07-23 15:48 ` Jeff Dike
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2008-07-23 15:48 UTC (permalink / raw)
To: WANG Cong; +Cc: LKML, user-mode-linux-devel
On Tue, Jul 22, 2008 at 06:41:52PM +0100, WANG Cong wrote:
>
> 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
Thanks - added to the queue.
Jeff
--
Work email - jdike at linux dot intel dot com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-23 15:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-22 17:41 [uml-devel] [Patch] uml: fix another build error WANG Cong
2008-07-22 17:41 ` WANG Cong
2008-07-23 15:48 ` [uml-devel] " Jeff Dike
2008-07-23 15:48 ` Jeff Dike
-- strict thread matches above, loose matches on Subject: below --
2008-04-12 15:39 [uml-devel] [Patch] UML: Fix " WANG Cong
2008-04-14 15:43 ` Jeff Dike
2008-04-16 5:41 ` WANG Cong
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.