Re: [PATCH] uart:8250: change lock order in serial8250_do_startup()
From: Sergey Senozhatsky <hidden>
Date: 2020-08-14 11:29:45
Also in:
lkml
From: Sergey Senozhatsky <hidden>
Date: 2020-08-14 11:29:45
Also in:
lkml
On (20/08/14 12:59), Andy Shevchenko wrote:
quoted
--- drivers/tty/serial/8250/8250_port.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 09475695effd..67f1a4f31093 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c@@ -2275,6 +2275,11 @@ int serial8250_do_startup(struct uart_port *port) if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) { unsigned char iir1;quoted
+ bool irq_shared = up->port.irqflags & IRQF_SHARED;I'm wondering why we need a temporary variable? This flag is not supposed to be changed in between, can we leave original conditionals?
No particular reason. We can keep the original (long) ones, I guess.
Nevertheless I noticed an inconsistency of the dereference of the flags which
seems to be brough by dfe42443ea1d ("serial: reduce number of indirections in
8250 code").
I think we can stick with newer:
if (port->irqflags & IRQF_SHARED)I'll take a look. -ss