2014-11-10 16:13:29

by Jim Davis

[permalink] [raw]
Subject: randconfig build error with next-20141110, in drivers/tty/vt/vt.c

Building with the attached random configuration file,

drivers/tty/vt/vt.c: In function ‘tioclinux’:
drivers/tty/vt/vt.c:2703:4: error: implicit declaration of function
‘vt_get_kmsg_redirect’ [-Werror=implicit-function-declaration]
data = vt_get_kmsg_redirect();
^
cc1: some warnings being treated as errors
make[3]: *** [drivers/tty/vt/vt.o] Error 1


Attachments:
randconfig-1415620059.txt (86.18 kB)

2014-11-10 18:10:51

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: randconfig build error with next-20141110, in drivers/tty/vt/vt.c

On Mon, Nov 10, 2014 at 09:13:25AM -0700, Jim Davis wrote:
> Building with the attached random configuration file,
>
> drivers/tty/vt/vt.c: In function ‘tioclinux’:
> drivers/tty/vt/vt.c:2703:4: error: implicit declaration of function
> ‘vt_get_kmsg_redirect’ [-Werror=implicit-function-declaration]
> data = vt_get_kmsg_redirect();
> ^
> cc1: some warnings being treated as errors
> make[3]: *** [drivers/tty/vt/vt.o] Error 1

This is due to a patch from Peter Hurley, but I can't work out what to
do to fix it...

Peter?

2014-11-11 16:21:15

by Peter Hurley

[permalink] [raw]
Subject: [PATCH -next] vt: Fix build breakage when !CONFIG_VT_CONSOLE

Commit 68952076e9226cc23ebce66d3fc2fdb8b6c04c30 ("vt: Remove
vt_get_kmsg_redirect() from uapi header") fails to compile if
!CONFIG_VT_CONSOLE.

Move macro definition for vt_get_kmsg_redirect() up with file-scope
function declarations.

Reported-by: Jim Davis <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
---
drivers/tty/vt/vt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 3dc5d56..ad27ade 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -156,6 +156,8 @@ static void console_callback(struct work_struct *ignored);
static void blank_screen_t(unsigned long dummy);
static void set_palette(struct vc_data *vc);

+#define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)
+
static int printable; /* Is console ready for printing? */
int default_utf8 = true;
module_param(default_utf8, int, S_IRUGO | S_IWUSR);
@@ -2509,8 +2511,6 @@ int vt_kmsg_redirect(int new)
return kmsg_con;
}

-#define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)
-
/*
* Console on virtual terminal
*
--
2.1.3