diff options
author | Randy Dunlap <[email protected]> | 2021-08-04 17:02:16 -0700 |
---|---|---|
committer | Thomas Bogendoerfer <[email protected]> | 2021-08-05 10:58:21 +0200 |
commit | ad548993a66c498267695edd8b19a682be0e3a8b (patch) | |
tree | 9fee672c839d7f22f23772b04789e0be0f954b50 /scripts/clang-tools/gen_compile_commands.py | |
parent | 730d070ae9f12fff5d44fe8fb0547ae37d100da8 (diff) |
MIPS: loongson2ef: don't build serial.o unconditionally
LOONGSON_UART_BASE depends on EARLY_PRINTK || SERIAL_8250, but when
neither of these Kconfig symbols is set, the kernel build has errors:
../arch/mips/loongson2ef/common/serial.c: In function 'serial_init':
../arch/mips/loongson2ef/common/serial.c:66:25: error: 'loongson_uart_base' undeclared (first use in this function)
66 | loongson_uart_base;
../arch/mips/loongson2ef/common/serial.c:66:25: note: each undeclared identifier is reported only once for each function it appears in
../arch/mips/loongson2ef/common/serial.c:68:41: error: '_loongson_uart_base' undeclared (first use in this function)
68 | (void __iomem *)_loongson_uart_base;
Fix this by building serial.o only when one (or both) of these
Kconfig symbols is enabled.
Tested with:
(a) EARLY_PRINTK=y, SERIAL_8250 not set;
(b) EARLY_PRINTK=y, SERIAL_8250=y;
(c) EARLY_PRINTK=y, SERIAL_8250=m.
(d) EARLY_PRINTK not set, SERIAL_8250=y;
(e) EARLY_PRINTK not set, SERIAL_8250=m;
(f) EARLY_PRINTK not set, SERIAL_8250 not set.
Signed-off-by: Randy Dunlap <[email protected]>
Reported-by: kernel test robot <[email protected]>
Cc: Jiaxun Yang <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: [email protected]
Signed-off-by: Thomas Bogendoerfer <[email protected]>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions