[bcain:bcain/qemu_boot 34/87] drivers/tty/serial/serial_core.c:1939:1: warning: 'optnone' attribute directive ignored

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux.git bcain/qemu_boot
head:   f5debfeae808bae06ccbc26605a5c1404eba2588
commit: 520783c1a795b1b4bd4c87483c2300e9f8e866c6 [34/87] hexagon: work around QEMU uart_port_activate codegen bug
config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260814/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260814/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/tty/serial/serial_core.c:1939:1: warning: 'optnone' attribute directive ignored [-Wattributes]
    1939 | {
         | ^


vim +/optnone +1939 drivers/tty/serial/serial_core.c

1c7b13c4886f5c drivers/tty/serial/serial_core.c Jiri Slaby     2011-11-09  1931  
520783c1a795b1 drivers/tty/serial/serial_core.c Brian Cain     2026-01-26  1932  /*
520783c1a795b1 drivers/tty/serial/serial_core.c Brian Cain     2026-01-26  1933   * Work around QEMU hexagon emulation bug: the conditional
520783c1a795b1 drivers/tty/serial/serial_core.c Brian Cain     2026-01-26  1934   * memd + dealloc_return packet generated at -O2 corrupts
520783c1a795b1 drivers/tty/serial/serial_core.c Brian Cain     2026-01-26  1935   * callee-saved registers due to incorrect packet semantics.
520783c1a795b1 drivers/tty/serial/serial_core.c Brian Cain     2026-01-26  1936   */
520783c1a795b1 drivers/tty/serial/serial_core.c Brian Cain     2026-01-26  1937  static int __attribute__((optnone))
520783c1a795b1 drivers/tty/serial/serial_core.c Brian Cain     2026-01-26  1938  uart_port_activate(struct tty_port *port, struct tty_struct *tty)
b3b57646186400 drivers/tty/serial/serial_core.c Rob Herring    2016-08-22 @1939  {
b3b57646186400 drivers/tty/serial/serial_core.c Rob Herring    2016-08-22  1940  	struct uart_state *state = container_of(port, struct uart_state, port);
b3b57646186400 drivers/tty/serial/serial_core.c Rob Herring    2016-08-22  1941  	struct uart_port *uport;
13b18d35909707 drivers/tty/serial/serial_core.c Serge Semin    2019-05-08  1942  	int ret;
b3b57646186400 drivers/tty/serial/serial_core.c Rob Herring    2016-08-22  1943  
4047b37122d1be drivers/tty/serial/serial_core.c Peter Hurley   2016-04-09  1944  	uport = uart_port_check(state);
b3b57646186400 drivers/tty/serial/serial_core.c Rob Herring    2016-08-22  1945  	if (!uport || uport->flags & UPF_DEAD)
b3b57646186400 drivers/tty/serial/serial_core.c Rob Herring    2016-08-22  1946  		return -ENXIO;
^1da177e4c3f41 drivers/serial/serial_core.c     Linus Torvalds 2005-04-16  1947  
^1da177e4c3f41 drivers/serial/serial_core.c     Linus Torvalds 2005-04-16  1948  	/*
^1da177e4c3f41 drivers/serial/serial_core.c     Linus Torvalds 2005-04-16  1949  	 * Start up the serial port.
^1da177e4c3f41 drivers/serial/serial_core.c     Linus Torvalds 2005-04-16  1950  	 */
dcd794c6ed631b drivers/tty/serial/serial_core.c Ilpo Järvinen  2023-01-17  1951  	ret = uart_startup(tty, state, false);
13b18d35909707 drivers/tty/serial/serial_core.c Serge Semin    2019-05-08  1952  	if (ret > 0)
9b5aa54986fc85 drivers/tty/serial/serial_core.c Ilpo Järvinen  2023-01-17  1953  		tty_port_set_active(port, true);
13b18d35909707 drivers/tty/serial/serial_core.c Serge Semin    2019-05-08  1954  
13b18d35909707 drivers/tty/serial/serial_core.c Serge Semin    2019-05-08  1955  	return ret;
^1da177e4c3f41 drivers/serial/serial_core.c     Linus Torvalds 2005-04-16  1956  }
^1da177e4c3f41 drivers/serial/serial_core.c     Linus Torvalds 2005-04-16  1957  

:::::: The code at line 1939 was first introduced by commit
:::::: b3b57646186400d4f54652ab7bbf55f5764d9467 tty: serial_core: convert uart_open to use tty_port_open

:::::: TO: Rob Herring <[email protected]>
:::::: CC: Greg Kroah-Hartman <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.