Commit ed647256 authored by Hugo Villeneuve's avatar Hugo Villeneuve Committed by Greg Kroah-Hartman
Browse files

serial: sc16is7xx: remove obsolete loop in sc16is7xx_port_irq()



Commit 83444987 ("sc16is7xx: Fix for multi-channel stall") changed
sc16is7xx_port_irq() from looping multiple times when there was still
interrupts to serve. It simply changed the do {} while(1) loop to a
do {} while(0) loop, which makes the loop itself now obsolete.

Clean the code by removing this obsolete do {} while(0) loop.

Fixes: 83444987 ("sc16is7xx: Fix for multi-channel stall")
Cc:  <stable@vger.kernel.org>
Suggested-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarHugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20231221231823.2327894-5-hugo@hugovil.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3ef79cd1
Loading
Loading
Loading
Loading
+41 −44
Original line number Diff line number Diff line
@@ -725,14 +725,12 @@ static void sc16is7xx_update_mlines(struct sc16is7xx_one *one)
static bool sc16is7xx_port_irq(struct sc16is7xx_port *s, int portno)
{
	bool rc = true;
	unsigned int iir, rxlen;
	struct uart_port *port = &s->p[portno].port;
	struct sc16is7xx_one *one = to_sc16is7xx_one(port, port);

	mutex_lock(&one->efr_lock);

	do {
		unsigned int iir, rxlen;

	iir = sc16is7xx_port_read(port, SC16IS7XX_IIR_REG);
	if (iir & SC16IS7XX_IIR_NO_INT_BIT) {
		rc = false;
@@ -776,7 +774,6 @@ static bool sc16is7xx_port_irq(struct sc16is7xx_port *s, int portno)
				    port->line, iir);
		break;
	}
	} while (0);

out_port_irq:
	mutex_unlock(&one->efr_lock);