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: <202601081607.yrciuDfu-lkp@intel.com>
Date: Thu, 08 Jan 2026 17:07:09 +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_core.c:330:48: warning:
 parameter 'line' set but not used

Hi Caleb,

First bad commit (maybe != root cause):

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/202601081607.yrciuDfu-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/202601081607.yrciuDfu-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/202601081607.yrciuDfu-lkp@intel.com/

All warnings (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];
         |                              ^~~~~~~~~~~~~~~~

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 +/line +330 drivers/tty/serial/8250/8250_core.c

a4416cd1ac7b48 drivers/tty/serial/8250/8250_core.c Peter Hurley              2015-02-24  315  
^1da177e4c3f41 drivers/serial/8250.c               Linus Torvalds            2005-04-16 @316  static struct uart_8250_port serial8250_ports[UART_NR];
^1da177e4c3f41 drivers/serial/8250.c               Linus Torvalds            2005-04-16  317  
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  318  /**
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  319   * serial8250_get_port - retrieve struct uart_8250_port
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  320   * @line: serial line number
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  321   *
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  322   * This function retrieves struct uart_8250_port for the specific line.
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  323   * This struct *must* *not* be used to perform a 8250 or serial core operation
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  324   * which is not accessible otherwise. Its only purpose is to make the struct
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  325   * accessible to the runtime-pm callbacks for context suspend/restore.
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  326   * The lock assumption made here is none because runtime-pm suspend/resume
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  327   * callbacks should not be invoked if there is any operation performed on the
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  328   * port.
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  329   */
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05 @330  struct uart_8250_port *serial8250_get_port(int line)
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  331  {
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  332  	return &serial8250_ports[line];
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05 @333  }
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  334  EXPORT_SYMBOL_GPL(serial8250_get_port);
ae14a7954f5124 drivers/tty/serial/8250/8250_core.c Sebastian Andrzej Siewior 2014-09-05  335  

:::::: The code at line 330 was first introduced by commit
:::::: ae14a7954f5124208e6e93cafb3099f83acd43f5 tty: serial: 8250_core: provide a function to export uart_8250_port

:::::: TO: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
:::::: 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