lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202601082201.7PCJ7ecM-lkp@intel.com>
Date: Thu, 08 Jan 2026 22:17:28 +0800
From: kernel test robot <lkp@...el.com>
To: Caleb James DeLisle <cjd@...ns.fr>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
 Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Subject: drivers/tty/serial/8250/8250.h:97:17: error:
 'CONFIG_SERIAL_8250_NR_UARTS' undeclared here (not in a function); did you
 mean 'CONFIG_SERIAL_8250'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
commit: 79ee1d20e37cd553cc961962fca8107e69a0c293 mips: econet: Fix incorrect Kconfig dependencies
date:   8 months ago
config: mips-randconfig-r051-20260108 (https://download.01.org/0day-ci/archive/20260108/202601082201.7PCJ7ecM-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260108/202601082201.7PCJ7ecM-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601082201.7PCJ7ecM-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/tty/serial/8250/8250_core.c:39:
>> drivers/tty/serial/8250/8250.h:97:17: error: 'CONFIG_SERIAL_8250_NR_UARTS' undeclared here (not in a function); did you mean 'CONFIG_SERIAL_8250'?
      97 | #define UART_NR CONFIG_SERIAL_8250_NR_UARTS
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/tty/serial/8250/8250_core.c:316:47: note: in expansion of macro 'UART_NR'
     316 | static struct uart_8250_port serial8250_ports[UART_NR];
         |                                               ^~~~~~~
   drivers/tty/serial/8250/8250_core.c: In function 'serial8250_get_port':
   drivers/tty/serial/8250/8250_core.c:330:48: warning: parameter 'line' set but not used [-Wunused-but-set-parameter]
     330 | struct uart_8250_port *serial8250_get_port(int line)
         |                                            ~~~~^~~~
   In file included from include/linux/build_bug.h:5,
                    from include/linux/bits.h:22,
                    from include/linux/ioport.h:13,
                    from include/linux/acpi.h:12,
                    from drivers/tty/serial/8250/8250_core.c:15:
   drivers/tty/serial/8250/8250_core.c: In function 'early_serial_setup':
>> include/linux/compiler.h:197:77: error: expression in static assertion is not an integer
     197 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);}))
         |                                                                             ^
   include/linux/compiler.h:202:28: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG'
     202 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \
         |                            ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
      11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   drivers/tty/serial/8250/8250_core.c:542:20: note: in expansion of macro 'ARRAY_SIZE'
     542 |  if (port->line >= ARRAY_SIZE(serial8250_ports) || nr_uarts == 0)
         |                    ^~~~~~~~~~
   drivers/tty/serial/8250/8250_core.c: In function 'serial8250_suspend_port':
   drivers/tty/serial/8250/8250_core.c:580:34: warning: parameter 'line' set but not used [-Wunused-but-set-parameter]
     580 | void serial8250_suspend_port(int line)
         |                              ~~~~^~~~
   drivers/tty/serial/8250/8250_core.c: In function 'serial8250_resume_port':
   drivers/tty/serial/8250/8250_core.c:604:33: warning: parameter 'line' set but not used [-Wunused-but-set-parameter]
     604 | void serial8250_resume_port(int line)
         |                             ~~~~^~~~
   drivers/tty/serial/8250/8250_core.c: In function 'serial8250_get_port':
   drivers/tty/serial/8250/8250_core.c:333:1: warning: control reaches end of non-void function [-Wreturn-type]
     333 | }
         | ^
   At top level:
   drivers/tty/serial/8250/8250_core.c:316:30: warning: 'serial8250_ports' defined but not used [-Wunused-variable]
     316 | static struct uart_8250_port serial8250_ports[UART_NR];
         |                              ^~~~~~~~~~~~~~~~
--
>> drivers/tty/serial/8250/8250_platform.c:36:25: error: 'CONFIG_SERIAL_8250_RUNTIME_UARTS' undeclared here (not in a function)
      36 | unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/tty/serial/8250/8250_platform.c:25:
   drivers/tty/serial/8250/8250_platform.c: In function '__serial8250_isa_init_ports':
>> drivers/tty/serial/8250/8250.h:97:17: error: 'CONFIG_SERIAL_8250_NR_UARTS' undeclared (first use in this function); did you mean 'CONFIG_SERIAL_8250'?
      97 | #define UART_NR CONFIG_SERIAL_8250_NR_UARTS
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/tty/serial/8250/8250_platform.c:64:17: note: in expansion of macro 'UART_NR'
      64 |  if (nr_uarts > UART_NR)
         |                 ^~~~~~~
   drivers/tty/serial/8250/8250.h:97:17: note: each undeclared identifier is reported only once for each function it appears in
      97 | #define UART_NR CONFIG_SERIAL_8250_NR_UARTS
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/tty/serial/8250/8250_platform.c:64:17: note: in expansion of macro 'UART_NR'
      64 |  if (nr_uarts > UART_NR)
         |                 ^~~~~~~
   drivers/tty/serial/8250/8250_platform.c: In function 'serial8250_suspend':
>> drivers/tty/serial/8250/8250.h:97:17: error: 'CONFIG_SERIAL_8250_NR_UARTS' undeclared (first use in this function); did you mean 'CONFIG_SERIAL_8250'?
      97 | #define UART_NR CONFIG_SERIAL_8250_NR_UARTS
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/tty/serial/8250/8250_platform.c:247:18: note: in expansion of macro 'UART_NR'
     247 |  for (i = 0; i < UART_NR; i++) {
         |                  ^~~~~~~
   drivers/tty/serial/8250/8250_platform.c: In function 'serial8250_resume':
>> drivers/tty/serial/8250/8250.h:97:17: error: 'CONFIG_SERIAL_8250_NR_UARTS' undeclared (first use in this function); did you mean 'CONFIG_SERIAL_8250'?
      97 | #define UART_NR CONFIG_SERIAL_8250_NR_UARTS
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/tty/serial/8250/8250_platform.c:261:18: note: in expansion of macro 'UART_NR'
     261 |  for (i = 0; i < UART_NR; i++) {
         |                  ^~~~~~~
   drivers/tty/serial/8250/8250_platform.c: In function 'serial8250_init':
>> drivers/tty/serial/8250/8250.h:97:17: error: 'CONFIG_SERIAL_8250_NR_UARTS' undeclared (first use in this function); did you mean 'CONFIG_SERIAL_8250'?
      97 | #define UART_NR CONFIG_SERIAL_8250_NR_UARTS
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/tty/serial/8250/8250_platform.c:309:22: note: in expansion of macro 'UART_NR'
     309 |  serial8250_reg.nr = UART_NR;
         |                      ^~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SERIAL_8250
   Depends on [n]: TTY [=n] && HAS_IOMEM [=y] && !S390
   Selected by [y]:
   - ECONET [=y]
   WARNING: unmet direct dependencies detected for SERIAL_OF_PLATFORM
   Depends on [n]: TTY [=n] && HAS_IOMEM [=y] && SERIAL_8250 [=y] && OF [=y]
   Selected by [y]:
   - ECONET [=y]


vim +97 drivers/tty/serial/8250/8250.h

4ba5e35daa90871 drivers/serial/8250.h          Russell King    2005-06-23  95  
ffd8e8bd26e945a drivers/tty/serial/8250/8250.h Andy Shevchenko 2024-05-06  96  /* Module parameters */
ffd8e8bd26e945a drivers/tty/serial/8250/8250.h Andy Shevchenko 2024-05-06 @97  #define UART_NR	CONFIG_SERIAL_8250_NR_UARTS
ffd8e8bd26e945a drivers/tty/serial/8250/8250.h Andy Shevchenko 2024-05-06  98  

:::::: The code at line 97 was first introduced by commit
:::::: ffd8e8bd26e945a957e827427e8cbe8fa8e23d0d serial: 8250: Extract platform driver

:::::: TO: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ