[PATCH v3 4/7] serial: 8250: Simplify serial8250_match_port()

From: Uwe Kleine-König (The Capable Hub)

Date: Fri Aug 14 2026 - 05:23:15 EST


For 8250 devices .iotype is never UPIO_BUS, so drop the respective if
branch.

Suggested-by: Hugo Villeneuve <hugo@xxxxxxxxxxx>
Link: https://lore.kernel.org/linux-serial/20260803152228.9e3cd296a41e68304b82a22a@xxxxxxxxxxx
Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
drivers/tty/serial/8250/8250_core.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index d8199c583830..11424fef7c08 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -692,8 +692,6 @@ static bool serial8250_match_port(const struct uart_port *port1,
return hub6_match_port(port1, port2);
else if (uart_iotype_mmio(port1->iotype))
return port1->mapbase == port2->mapbase;
- else if (port1->iotype == UPIO_BUS)
- return true;
else
return false;
}
--
2.55.0.11.g153666a7d9bb