Message ID | 1589512985-27419-2-git-send-email-yangtiezhu@loongson.cn (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2,1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module | expand |
On Fri, May 15, 2020 at 11:23:05AM +0800, Tiezhu Yang wrote: > When CONFIG_HAVE_STD_PC_SERIAL_PORT is set, include linux/module.h to fix > the following build errors: how are you doing this ? To me it looks like this CONFIG option isn't used anymore. Thomas.
On 05/15/2020 03:39 PM, Thomas Bogendoerfer wrote: > On Fri, May 15, 2020 at 11:23:05AM +0800, Tiezhu Yang wrote: >> When CONFIG_HAVE_STD_PC_SERIAL_PORT is set, include linux/module.h to fix >> the following build errors: > how are you doing this ? To me it looks like this CONFIG option isn't > used anymore. Because I will use arch/mips/kernel/8250-platform.c in the near future, so make MACH_LOONGSON64 selects HAVE_STD_PC_SERIAL_PORT, then I find the build errors. Thanks, Tiezhu Yang > > Thomas. >
于 2020年5月15日 GMT+08:00 下午3:54:46, Tiezhu Yang <yangtiezhu@loongson.cn> 写到: >On 05/15/2020 03:39 PM, Thomas Bogendoerfer wrote: >> On Fri, May 15, 2020 at 11:23:05AM +0800, Tiezhu Yang wrote: >>> When CONFIG_HAVE_STD_PC_SERIAL_PORT is set, include linux/module.h to fix >>> the following build errors: >> how are you doing this ? To me it looks like this CONFIG option isn't >> used anymore. > >Because I will use arch/mips/kernel/8250-platform.c in the near future, >so make MACH_LOONGSON64 selects HAVE_STD_PC_SERIAL_PORT, then >I find the build errors. Please never use it. If you are willing to add serial port then please do it in devicetree. Platform devices in wild is dangerous and it will break everything. > >Thanks, >Tiezhu Yang > >> >> Thomas. >> >
On 05/15/2020 04:19 PM, Jiaxun Yang wrote: > > 于 2020年5月15日 GMT+08:00 下午3:54:46, Tiezhu Yang <yangtiezhu@loongson.cn> 写到: >> On 05/15/2020 03:39 PM, Thomas Bogendoerfer wrote: >>> On Fri, May 15, 2020 at 11:23:05AM +0800, Tiezhu Yang wrote: >>>> When CONFIG_HAVE_STD_PC_SERIAL_PORT is set, include linux/module.h to fix >>>> the following build errors: >>> how are you doing this ? To me it looks like this CONFIG option isn't >>> used anymore. >> Because I will use arch/mips/kernel/8250-platform.c in the near future, >> so make MACH_LOONGSON64 selects HAVE_STD_PC_SERIAL_PORT, then >> I find the build errors. > Please never use it. > If you are willing to add serial port then please do it > in devicetree. > Platform devices in wild is dangerous and it will break everything. Hi Jiaxun, OK, Thanks for your suggestion. I will rethink my plan. Hi Thomas, Because CONFIG_HAVE_STD_PC_SERIAL_PORT is not used anymore, (1) Is it necessary to fix this possible build error? or (2) Should we remove this arch/mips/kernel/8250-platform.c? Thanks, Tiezhu Yang > >> Thanks, >> Tiezhu Yang >> >>> Thomas. >>>
On Fri, May 15, 2020 at 04:54:09PM +0800, Tiezhu Yang wrote: > Because CONFIG_HAVE_STD_PC_SERIAL_PORT is not used anymore, > (2) Should we remove this arch/mips/kernel/8250-platform.c? lets get rid of it. Thomas.
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>
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(+)