Re: [PATCH v3] serial: 8250: 8250_omap: Do not start RX DMA on THRI interrupt

From: kernel test robot
Date: Tue Oct 31 2023 - 21:04:53 EST


Hi Ronald,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus usb/usb-testing usb/usb-next usb/usb-linus linus/master v6.6 next-20231031]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Ronald-Wahl/serial-8250-8250_omap-Do-not-start-RX-DMA-on-THRI-interrupt/20231031-191258
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link: https://lore.kernel.org/r/20231031110950.11714-1-rwahl%40gmx.de
patch subject: [PATCH v3] serial: 8250: 8250_omap: Do not start RX DMA on THRI interrupt
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20231101/202311010816.kXNniDbT-lkp@xxxxxxxxx/config)
compiler: mips-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231101/202311010816.kXNniDbT-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311010816.kXNniDbT-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/tty/serial/8250/8250_omap.c: In function 'omap_8250_dma_handle_irq':
>> drivers/tty/serial/8250/8250_omap.c:1301:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
1301 | if ((iir & 0x3f) != UART_IIR_THRI)
| ^


vim +/else +1301 drivers/tty/serial/8250/8250_omap.c

1279
1280 /*
1281 * This is mostly serial8250_handle_irq(). We have a slightly different DMA
1282 * hoook for RX/TX and need different logic for them in the ISR. Therefore we
1283 * use the default routine in the non-DMA case and this one for with DMA.
1284 */
1285 static int omap_8250_dma_handle_irq(struct uart_port *port)
1286 {
1287 struct uart_8250_port *up = up_to_u8250p(port);
1288 struct omap8250_priv *priv = up->port.private_data;
1289 u16 status;
1290 u8 iir;
1291
1292 iir = serial_port_in(port, UART_IIR);
1293 if (iir & UART_IIR_NO_INT) {
1294 return IRQ_HANDLED;
1295 }
1296
1297 uart_port_lock(port);
1298
1299 status = serial_port_in(port, UART_LSR);
1300
> 1301 if ((iir & 0x3f) != UART_IIR_THRI)
1302 if (priv->habit & UART_HAS_EFR2)
1303 am654_8250_handle_rx_dma(up, iir, status);
1304 else
1305 status = omap_8250_handle_rx_dma(up, iir, status);
1306
1307 serial8250_modem_status(up);
1308 if (status & UART_LSR_THRE && up->dma->tx_err) {
1309 if (uart_tx_stopped(&up->port) ||
1310 uart_circ_empty(&up->port.state->xmit)) {
1311 up->dma->tx_err = 0;
1312 serial8250_tx_chars(up);
1313 } else {
1314 /*
1315 * try again due to an earlier failer which
1316 * might have been resolved by now.
1317 */
1318 if (omap_8250_tx_dma(up))
1319 serial8250_tx_chars(up);
1320 }
1321 }
1322
1323 uart_unlock_and_check_sysrq(port);
1324
1325 return 1;
1326 }
1327

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