2002-01-05 06:54:49

by Frank Davis

[permalink] [raw]
Subject: 2.5.2-pre8: drivers/char/lp.c compile error

Hello all,

While 'make bzImage', I received the following error:

...
lp.c: In function 'lp_console_device':
lp.c:686: imcompatible type in return
lp.c:687: warning: control reaches end of non-void function
Amake[2]: *** [lp.o] Error 1
make[2]: Leaving directory '/usr/src/linux/drivers/char'
...

Regards,
Frank


2002-01-05 06:59:20

by Frank Davis

[permalink] [raw]
Subject: [PATCH] 2.5.2-pre8: drivers/char/lp.c compile error

Hello all,
The following patch should do the trick.
Regards,
Frank

--- drivers/char/lp.c.old Sat Jan 5 00:25:41 2002
+++ drivers/char/lp.c Sat Jan 5 01:44:23 2002
@@ -683,7 +683,7 @@

static kdev_t lp_console_device (struct console *c)
{
- return MKDEV(LP_MAJOR, CONSOLE_LP);
+ return mk_kdev(LP_MAJOR, CONSOLE_LP);
}

static struct console lpcons = {

On Sat, 5 Jan 2002, Frank Davis wrote:

> Hello all,
>
> While 'make bzImage', I received the following error:
>
> ...
> lp.c: In function 'lp_console_device':
> lp.c:686: imcompatible type in return
> lp.c:687: warning: control reaches end of non-void function
> Amake[2]: *** [lp.o] Error 1
> make[2]: Leaving directory '/usr/src/linux/drivers/char'
> ...
>
> Regards,
> Frank
>
>