[patch] Re: Fw: Re: 2.6.7-mm7

From: BlaisorBlade
Date: Thu Jul 22 2004 - 13:22:44 EST


Alle 22:25, sabato 10 luglio 2004, Andrew Morton ha scritto:
> Begin forwarded message:
>
> Date: Sat, 10 Jul 2004 20:29:49 +0200
> From: Diego Calleja García <diegocg@xxxxxxxxxxx>
> To: jdike@xxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx, akpm@xxxxxxxx
> Subject: Re: 2.6.7-mm7
>
> El Thu, 8 Jul 2004 23:50:25 -0700 Andrew Morton <akpm@xxxxxxxx> escribió:
> > - Added a big UML update. Needs work.
>
> Fails to compile here (gcc (GCC) 3.3.4 (Debian 1:3.3.4-3) and
> config "ARCH=um make defconfig")
>
> CC arch/um/drivers/stdio_console.o
> arch/um/drivers/stdio_console.c:207: error: conflicting types for
> `console_device' include/linux/console.h:107: error: previous declaration
> of `console_device' make[1]: *** [arch/um/drivers/stdio_console.o] Error 1

Probably something due to a -mm change. I simply renamed the stdio_console.c
console_device (which is static) to um_console_device.

The patch is against vanilla; but since the line numbers in the gcc message
don't match, there is probably some other change in that file. So give it a
check.

Here's the patch (both inline and attached).


In the -mm tree (in this moment) and not in 2.6.7 there is another console_device in
include/linux/console.h; so I renamed the UML one (it's static).

---

uml-linux-2.6.7-paolo/arch/um/drivers/stdio_console.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/um/drivers/stdio_console.c~fix-name-conflict-mm arch/um/drivers/stdio_console.c
--- uml-linux-2.6.7/arch/um/drivers/stdio_console.c~fix-name-conflict-mm 2004-07-22 16:54:12.827219496 +0200
+++ uml-linux-2.6.7-paolo/arch/um/drivers/stdio_console.c 2004-07-22 16:55:10.785408512 +0200
@@ -203,7 +203,7 @@ static void console_write(struct console
up(&line->sem);
}

-static struct tty_driver *console_device(struct console *c, int *index)
+static struct tty_driver *um_console_device(struct console *c, int *index)
{
*index = c->index;
return console_driver;
@@ -217,7 +217,7 @@ static int console_setup(struct console
static struct console stdiocons = {
name: "tty",
write: console_write,
- device: console_device,
+ device: um_console_device,
setup: console_setup,
flags: CON_PRINTBUFFER,
index: -1,
_

--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729





In the -mm tree (in this moment) and not in 2.6.7 there is another console_device in
include/linux/console.h; so I renamed the UML one (it's static).

---

uml-linux-2.6.7-paolo/arch/um/drivers/stdio_console.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/um/drivers/stdio_console.c~fix-name-conflict-mm arch/um/drivers/stdio_console.c
--- uml-linux-2.6.7/arch/um/drivers/stdio_console.c~fix-name-conflict-mm 2004-07-22 16:54:12.827219496 +0200
+++ uml-linux-2.6.7-paolo/arch/um/drivers/stdio_console.c 2004-07-22 16:55:10.785408512 +0200
@@ -203,7 +203,7 @@ static void console_write(struct console
up(&line->sem);
}

-static struct tty_driver *console_device(struct console *c, int *index)
+static struct tty_driver *um_console_device(struct console *c, int *index)
{
*index = c->index;
return console_driver;
@@ -217,7 +217,7 @@ static int console_setup(struct console
static struct console stdiocons = {
name: "tty",
write: console_write,
- device: console_device,
+ device: um_console_device,
setup: console_setup,
flags: CON_PRINTBUFFER,
index: -1,
_