Skip to contentSkip to conversation

c6x: kernel: setup: Include "linux/console.h" if both VT and DUMMY_CONSOLE enabled

PATCH New Chen Gang S 2 participants 2 messages Mar 1, 2015 – Mar 3, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 c6x: kernel: setup: Include "linux/console.h" if both VT and DUMMY_CONSOLE enabled

This patch below is sent from my other email address ([email protected]), but is rejected by [email protected], so I forward it by my original email address.

Excuse me, I will leave current company soon (sunrus.com.cn), so I have to change my email address too. At present, gmail in China is still not stable enough, so I have to use other personal email: [email protected].

If linux-kernel mailing list can not accept personal qq email address, please let me know, I shall try to look for another personal email addresses.

Thanks.

-------- Forwarded Message --------
Subject: [PATCH] c6x: kernel: setup: Include "linux/console.h" if both VT and DUMMY_CONSOLE enabled
Date: Sun, 01 Mar 2015 15:59:19 +0800
From: Chen Gang <[email protected]>
To: [email protected], [email protected], [email protected]
CC: [email protected] <[email protected]>, [email protected] <[email protected]>

Or c6x will cause building break for allmodconfig, the related error:

CC arch/c6x/kernel/setup.o
arch/c6x/kernel/setup.c: In function 'setup_arch':
arch/c6x/kernel/setup.c:433:2: error: 'conswitchp' undeclared (first use in this function)

    conswitchp = &dummy_con;
    ^
  arch/c6x/kernel/setup.c:433:2: note: each undeclared identifier is reported only once for each function it appears in
  arch/c6x/kernel/setup.c:433:16: error: 'dummy_con' undeclared (first use in this function)
    conswitchp = &dummy_con;
                  ^
---
 arch/c6x/kernel/setup.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/c6x/kernel/setup.c +3 -1
index 7571288..a5f6e0e 100644
@@ -26,7 +26,9 @@
 #include <linux/cpu.h>
 #include <linux/fs.h>
 #include <linux/of.h>
-
+#if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
+#include <linux/console.h>
+#endif
 
 #include <asm/sections.h>
 #include <asm/div64.h>
Signature · 1 line
1.9.3
#2 lore raw
In reply to a message not in the archive
Quoted 22 lines · Chen Gang

Or c6x will cause building break for allmodconfig, the related error:

CC arch/c6x/kernel/setup.o
arch/c6x/kernel/setup.c: In function 'setup_arch':
arch/c6x/kernel/setup.c:433:2: error: 'conswitchp' undeclared (first use in this function)

    conswitchp = &dummy_con;
    ^
  arch/c6x/kernel/setup.c:433:2: note: each undeclared identifier is reported only once for each function it appears in
  arch/c6x/kernel/setup.c:433:16: error: 'dummy_con' undeclared (first use in this function)
    conswitchp = &dummy_con;
                  ^
---
 arch/c6x/kernel/setup.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/c6x/kernel/setup.c +0 -0
index 7571288..a5f6e0e 100644

arch/c6x/kernel/setup.c line 31

Quoted 7 lines
arch/c6x/kernel/setup.c +3 -1
@@ -26,7 +26,9 @@
 #include <linux/cpu.h>
 #include <linux/fs.h>
 #include <linux/of.h>
-
+#if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
+#include <linux/console.h>
+#endif

No need for the #ifdefs around the include.
I removed them and pulled this into the c6x tree.

Thanks!

Quoted 3 lines
arch/c6x/kernel/setup.c +0 -0
 #include <asm/sections.h>
 #include <asm/div64.h>