Messages in this thread Patch in this message | | | From | Tiezhu Yang <> | Subject | [PATCH v2 2/2] MIPS: Fix build errors under CONFIG_HAVE_STD_PC_SERIAL_PORT | Date | Fri, 15 May 2020 11:23:05 +0800 |
| |
When CONFIG_HAVE_STD_PC_SERIAL_PORT is set, include linux/module.h to fix the following build errors:
CC arch/mips/kernel/8250-platform.o arch/mips/kernel/8250-platform.c:42:1: error: data definition has no type or storage class [-Werror] module_init(uart8250_init); ^ arch/mips/kernel/8250-platform.c:42:1: error: type defaults to ‘int’ in declaration of ‘module_init’ [-Werror=implicit-int] arch/mips/kernel/8250-platform.c:42:1: error: parameter names (without types) in function declaration [-Werror] arch/mips/kernel/8250-platform.c:44:15: error: expected declaration specifiers or ‘...’ before string constant MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); ^ arch/mips/kernel/8250-platform.c:45:16: error: expected declaration specifiers or ‘...’ before string constant MODULE_LICENSE("GPL"); ^ arch/mips/kernel/8250-platform.c:46:20: error: expected declaration specifiers or ‘...’ before string constant MODULE_DESCRIPTION("Generic 8250 UART probe driver"); ^ arch/mips/kernel/8250-platform.c:37:81: error: ‘uart8250_init’ defined but not used [-Werror=unused-function] static int __init uart8250_init(void) ^ cc1: all warnings being treated as errors scripts/Makefile.build:267: recipe for target 'arch/mips/kernel/8250-platform.o' failed make[2]: *** [arch/mips/kernel/8250-platform.o] Error 1
Fixes: 848484e2c412 ("mips: remove needless include of module.h from core kernel files.") Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> ---
v2: - No changes
arch/mips/kernel/8250-platform.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/mips/kernel/8250-platform.c b/arch/mips/kernel/8250-platform.c index 5c6b2ab..cbf3fe2 100644 --- a/arch/mips/kernel/8250-platform.c +++ b/arch/mips/kernel/8250-platform.c @@ -5,6 +5,7 @@ * * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) */ +#include <linux/module.h> #include <linux/init.h> #include <linux/serial_8250.h> -- 2.1.0
| |