arch/mips/loongson2ef/common/serial.c:66:4: error: 'loongson_uart_base' undeclared; did you mean

From: kernel test robot
Date: Wed Feb 24 2021 - 11:33:24 EST


Hi Jiaxun,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c03c21ba6f4e95e406a1a7b4c34ef334b977c194
commit: b13812ddea615b6507beef24f76540c0c1143c5c MIPS: Loongson2ef: Disable Loongson MMI instructions
date: 5 months ago
config: mips-randconfig-r025-20210224 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b13812ddea615b6507beef24f76540c0c1143c5c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b13812ddea615b6507beef24f76540c0c1143c5c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

arch/mips/loongson2ef/common/serial.c: In function 'serial_init':
>> arch/mips/loongson2ef/common/serial.c:66:4: error: 'loongson_uart_base' undeclared (first use in this function); did you mean 'loongson2_cpu_set_rate'?
66 | loongson_uart_base;
| ^~~~~~~~~~~~~~~~~~
| loongson2_cpu_set_rate
arch/mips/loongson2ef/common/serial.c:66:4: note: each undeclared identifier is reported only once for each function it appears in
>> arch/mips/loongson2ef/common/serial.c:68:20: error: '_loongson_uart_base' undeclared (first use in this function)
68 | (void __iomem *)_loongson_uart_base;
| ^~~~~~~~~~~~~~~~~~~


vim +66 arch/mips/loongson2ef/common/serial.c

71e2f4dd5a65bd Jiaxun Yang 2019-10-20 57
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 58 static int __init serial_init(void)
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 59 {
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 60 unsigned char iotype;
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 61
5831fdb099ddee Jiaxun Yang 2019-10-20 62 iotype = uart8250_data[mips_machtype].iotype;
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 63
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 64 if (UPIO_MEM == iotype) {
5831fdb099ddee Jiaxun Yang 2019-10-20 65 uart8250_data[mips_machtype].mapbase =
5831fdb099ddee Jiaxun Yang 2019-10-20 @66 loongson_uart_base;
5831fdb099ddee Jiaxun Yang 2019-10-20 67 uart8250_data[mips_machtype].membase =
5831fdb099ddee Jiaxun Yang 2019-10-20 @68 (void __iomem *)_loongson_uart_base;
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 69 }
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 70 else if (UPIO_PORT == iotype)
5831fdb099ddee Jiaxun Yang 2019-10-20 71 uart8250_data[mips_machtype].iobase =
5831fdb099ddee Jiaxun Yang 2019-10-20 72 loongson_uart_base - LOONGSON_PCIIO_BASE;
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 73
5831fdb099ddee Jiaxun Yang 2019-10-20 74 memset(&uart8250_data[mips_machtype + 1], 0,
5831fdb099ddee Jiaxun Yang 2019-10-20 75 sizeof(struct plat_serial8250_port));
5831fdb099ddee Jiaxun Yang 2019-10-20 76 uart8250_device.dev.platform_data = &uart8250_data[mips_machtype];
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 77
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 78 return platform_device_register(&uart8250_device);
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 79 }
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 80 module_init(serial_init);
71e2f4dd5a65bd Jiaxun Yang 2019-10-20 81

:::::: The code at line 66 was first introduced by commit
:::::: 5831fdb099ddeec9849658cd534fdcbb03aa6ff9 MIPS: Loongson2ef: clean up loongson64 related code

:::::: TO: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
:::::: CC: Paul Burton <paulburton@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip