All of lore.kernel.org
 help / color / mirror / Atom feed
* [arnd-asm-generic:master 5/20] drivers/tty/serial/8250/8250_port.c:1333 autoconfig_irq() warn: bitwise AND condition is false here
@ 2024-10-30  2:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-30  2:45 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-arch@vger.kernel.org
TO: Niklas Schnelle <schnelle@linux.ibm.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: "Maciej W. Rozycki" <macro@orcam.me.uk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
head:   c0dc92144ba181cf7ba366a87909bbaa93d5b713
commit: 7c7e6c8924e7bf98db4e5b2edb202842003c00c2 [5/20] tty: serial: handle HAS_IOPORT dependencies
:::::: branch date: 10 hours ago
:::::: commit date: 29 hours ago
config: csky-randconfig-r072-20241030 (https://download.01.org/0day-ci/archive/20241030/202410301044.4DoDIy4o-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.1.0

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202410301044.4DoDIy4o-lkp@intel.com/

New smatch warnings:
drivers/tty/serial/8250/8250_port.c:1333 autoconfig_irq() warn: bitwise AND condition is false here
drivers/tty/serial/8250/8250_port.c:2375 serial8250_do_startup() warn: bitwise AND condition is false here
drivers/tty/serial/8250/8250_port.c:2502 serial8250_do_shutdown() warn: bitwise AND condition is false here

Old smatch warnings:
drivers/tty/serial/8250/8250_port.c:1352 autoconfig_irq() warn: bitwise AND condition is false here
drivers/tty/serial/8250/8250_port.c:1376 autoconfig_irq() warn: bitwise AND condition is false here
drivers/tty/serial/8250/8250_port.c:2457 serial8250_do_startup() warn: bitwise AND condition is false here

vim +1333 drivers/tty/serial/8250/8250_port.c

b6830f6df8914f Peter Hurley    2015-06-27  1323  
b6830f6df8914f Peter Hurley    2015-06-27  1324  static void autoconfig_irq(struct uart_8250_port *up)
b6830f6df8914f Peter Hurley    2015-06-27  1325  {
b6830f6df8914f Peter Hurley    2015-06-27  1326  	struct uart_port *port = &up->port;
b6830f6df8914f Peter Hurley    2015-06-27  1327  	unsigned char save_mcr, save_ier;
b6830f6df8914f Peter Hurley    2015-06-27  1328  	unsigned char save_ICP = 0;
b6830f6df8914f Peter Hurley    2015-06-27  1329  	unsigned int ICP = 0;
b6830f6df8914f Peter Hurley    2015-06-27  1330  	unsigned long irqs;
b6830f6df8914f Peter Hurley    2015-06-27  1331  	int irq;
b6830f6df8914f Peter Hurley    2015-06-27  1332  
b6830f6df8914f Peter Hurley    2015-06-27 @1333  	if (port->flags & UPF_FOURPORT) {
b6830f6df8914f Peter Hurley    2015-06-27  1334  		ICP = (port->iobase & 0xfe0) | 0x1f;
b6830f6df8914f Peter Hurley    2015-06-27  1335  		save_ICP = inb_p(ICP);
b6830f6df8914f Peter Hurley    2015-06-27  1336  		outb_p(0x80, ICP);
b6830f6df8914f Peter Hurley    2015-06-27  1337  		inb_p(ICP);
b6830f6df8914f Peter Hurley    2015-06-27  1338  	}
b6830f6df8914f Peter Hurley    2015-06-27  1339  
b6830f6df8914f Peter Hurley    2015-06-27  1340  	/* forget possible initially masked and pending IRQ */
b6830f6df8914f Peter Hurley    2015-06-27  1341  	probe_irq_off(probe_irq_on());
36fd95b17e9c1c Yegor Yefremov  2016-05-31  1342  	save_mcr = serial8250_in_MCR(up);
d0b309a5d3f464 John Ogness     2023-05-25  1343  	/* Synchronize UART_IER access against the console. */
e8f87d3c335702 Thomas Gleixner 2023-09-14  1344  	uart_port_lock_irq(port);
b6830f6df8914f Peter Hurley    2015-06-27  1345  	save_ier = serial_in(up, UART_IER);
e8f87d3c335702 Thomas Gleixner 2023-09-14  1346  	uart_port_unlock_irq(port);
36fd95b17e9c1c Yegor Yefremov  2016-05-31  1347  	serial8250_out_MCR(up, UART_MCR_OUT1 | UART_MCR_OUT2);
b6830f6df8914f Peter Hurley    2015-06-27  1348  
b6830f6df8914f Peter Hurley    2015-06-27  1349  	irqs = probe_irq_on();
36fd95b17e9c1c Yegor Yefremov  2016-05-31  1350  	serial8250_out_MCR(up, 0);
b6830f6df8914f Peter Hurley    2015-06-27  1351  	udelay(10);
b6830f6df8914f Peter Hurley    2015-06-27  1352  	if (port->flags & UPF_FOURPORT) {
36fd95b17e9c1c Yegor Yefremov  2016-05-31  1353  		serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS);
b6830f6df8914f Peter Hurley    2015-06-27  1354  	} else {
36fd95b17e9c1c Yegor Yefremov  2016-05-31  1355  		serial8250_out_MCR(up,
b6830f6df8914f Peter Hurley    2015-06-27  1356  			UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2);
b6830f6df8914f Peter Hurley    2015-06-27  1357  	}
d0b309a5d3f464 John Ogness     2023-05-25  1358  	/* Synchronize UART_IER access against the console. */
e8f87d3c335702 Thomas Gleixner 2023-09-14  1359  	uart_port_lock_irq(port);
ef460db2a7c1df Ilpo Järvinen   2022-11-25  1360  	serial_out(up, UART_IER, UART_IER_ALL_INTR);
e8f87d3c335702 Thomas Gleixner 2023-09-14  1361  	uart_port_unlock_irq(port);
b6830f6df8914f Peter Hurley    2015-06-27  1362  	serial_in(up, UART_LSR);
b6830f6df8914f Peter Hurley    2015-06-27  1363  	serial_in(up, UART_RX);
b6830f6df8914f Peter Hurley    2015-06-27  1364  	serial_in(up, UART_IIR);
b6830f6df8914f Peter Hurley    2015-06-27  1365  	serial_in(up, UART_MSR);
b6830f6df8914f Peter Hurley    2015-06-27  1366  	serial_out(up, UART_TX, 0xFF);
b6830f6df8914f Peter Hurley    2015-06-27  1367  	udelay(20);
b6830f6df8914f Peter Hurley    2015-06-27  1368  	irq = probe_irq_off(irqs);
b6830f6df8914f Peter Hurley    2015-06-27  1369  
36fd95b17e9c1c Yegor Yefremov  2016-05-31  1370  	serial8250_out_MCR(up, save_mcr);
d0b309a5d3f464 John Ogness     2023-05-25  1371  	/* Synchronize UART_IER access against the console. */
e8f87d3c335702 Thomas Gleixner 2023-09-14  1372  	uart_port_lock_irq(port);
b6830f6df8914f Peter Hurley    2015-06-27  1373  	serial_out(up, UART_IER, save_ier);
e8f87d3c335702 Thomas Gleixner 2023-09-14  1374  	uart_port_unlock_irq(port);
b6830f6df8914f Peter Hurley    2015-06-27  1375  
b6830f6df8914f Peter Hurley    2015-06-27  1376  	if (port->flags & UPF_FOURPORT)
b6830f6df8914f Peter Hurley    2015-06-27  1377  		outb_p(save_ICP, ICP);
b6830f6df8914f Peter Hurley    2015-06-27  1378  
b6830f6df8914f Peter Hurley    2015-06-27  1379  	port->irq = (irq > 0) ? irq : 0;
b6830f6df8914f Peter Hurley    2015-06-27  1380  }
b6830f6df8914f Peter Hurley    2015-06-27  1381  

:::::: The code at line 1333 was first introduced by commit
:::::: b6830f6df8914faae9561bb245860c21af9b9e9b serial: 8250: Split base port operations from universal driver

:::::: TO: Peter Hurley <peter@hurleysoftware.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-30  2:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-30  2:45 [arnd-asm-generic:master 5/20] drivers/tty/serial/8250/8250_port.c:1333 autoconfig_irq() warn: bitwise AND condition is false here kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.