This is a note to let you know that I've just added the patch titled serial: sc16is7xx: improve do/while loop in sc16is7xx_irq() to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: serial-sc16is7xx-improve-do-while-loop-in-sc16is7xx_irq.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d5078509c8b06c5c472a60232815e41af81c6446 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx> Date: Thu, 21 Dec 2023 18:18:12 -0500 Subject: serial: sc16is7xx: improve do/while loop in sc16is7xx_irq() From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx> commit d5078509c8b06c5c472a60232815e41af81c6446 upstream. Simplify and improve readability by replacing while(1) loop with do {} while, and by using the keep_polling variable as the exit condition, making it more explicit. Fixes: 834449872105 ("sc16is7xx: Fix for multi-channel stall") Cc: <stable@xxxxxxxxxxxxxxx> Suggested-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> Signed-off-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx> Link: https://lore.kernel.org/r/20231221231823.2327894-6-hugo@xxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/tty/serial/sc16is7xx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -784,17 +784,18 @@ out_port_irq: static irqreturn_t sc16is7xx_irq(int irq, void *dev_id) { + bool keep_polling; + struct sc16is7xx_port *s = (struct sc16is7xx_port *)dev_id; - while (1) { - bool keep_polling = false; + do { int i; + keep_polling = false; + for (i = 0; i < s->devtype->nr_uart; ++i) keep_polling |= sc16is7xx_port_irq(s, i); - if (!keep_polling) - break; - } + } while (keep_polling); return IRQ_HANDLED; } Patches currently in stable-queue which might be from hvilleneuve@xxxxxxxxxxxx are queue-6.1/serial-sc16is7xx-remove-wasteful-static-buffer-in-sc16is7xx_regmap_name.patch queue-6.1/serial-sc16is7xx-remove-global-regmap-from-struct-sc16is7xx_port.patch queue-6.1/serial-sc16is7xx-change-efr-lock-to-operate-on-each-channels.patch queue-6.1/serial-sc16is7xx-remove-obsolete-loop-in-sc16is7xx_port_irq.patch queue-6.1/serial-sc16is7xx-convert-from-_raw_-to-_noinc_-regmap-functions-for-fifo.patch queue-6.1/serial-sc16is7xx-remove-unused-line-structure-member.patch queue-6.1/serial-sc16is7xx-fix-invalid-sc16is7xx_lines-bitfield-in-case-of-probe-error.patch queue-6.1/serial-sc16is7xx-improve-do-while-loop-in-sc16is7xx_irq.patch queue-6.1/serial-sc16is7xx-improve-regmap-debugfs-by-using-one-regmap-per-port.patch