Skip to contentSkip to conversation

tty: xuartps: Fix build when SYSRQ is disabled

PATCH In review Mark Brown 3 participants 5 messages Dec 17, 2013 – Dec 18, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 tty: xuartps: Fix build when SYSRQ is disabled

From: Mark Brown <[email protected]>

The sysrq field in struct uart_port is only defined when SERIAL_CORE_CONSOLE or SUPPORT_SYSRQ are selected but the driver uses the field unconditionally, causing build failures if they aren't (as happens when doing an arm64 allmodconfig). Make the usage conditional as well.

---
 drivers/tty/serial/xilinx_uartps.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/xilinx_uartps.c +2 -0
index e46e9f3f19b9..17de38064b2a 100644
@@ -240,6 +240,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
 					continue;
 			}
 
+#if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)
 			/*
 			 * uart_handle_sysrq_char() doesn't work if
 			 * spinlocked, for some reason
@@ -253,6 +254,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
 				}
 				spin_lock(&port->lock);
 			}
+#endif
 
 			port->icount.rx++;
 
Signature · 1 line
1.8.5.1
#1 lore raw
Quoted 8 lines · Mark Brown

From: Mark Brown <[email protected]>

The sysrq field in struct uart_port is only defined when SERIAL_CORE_CONSOLE or SUPPORT_SYSRQ are selected but the driver uses the field unconditionally, causing build failures if they aren't (as happens when doing an arm64 allmodconfig). Make the usage conditional as well.

Quoted 4 lines
---
 drivers/tty/serial/xilinx_uartps.c | 2 ++
 1 file changed, 2 insertions(+)

Is this a 3.13-final fix, or can it wait for 3.14?

thanks,

greg k-h

#2 lore raw

Hi Greg, Mark,

Quoted 9 lines · Greg Kroah-Hartman
Quoted 8 lines · Mark Brown

From: Mark Brown <[email protected]>

The sysrq field in struct uart_port is only defined when SERIAL_CORE_CONSOLE or SUPPORT_SYSRQ are selected but the driver uses the field unconditionally, causing build failures if they aren't (as happens when doing an arm64 allmodconfig). Make the usage conditional as well.

Quoted 6 lines
Quoted 4 lines
---
 drivers/tty/serial/xilinx_uartps.c | 2 ++
 1 file changed, 2 insertions(+)

Is this a 3.13-final fix, or can it wait for 3.14?

I sent out pretty much the same fix a week ago:
https://lkml.org/lkml/2013/12/2/694

It seems to fix a broken build for certain configurations. Hence, I'd say it's a fix for 3.13.

Sören

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 17 lines · S??ren Brinkmann

Hi Greg, Mark,

Quoted 14 lines · Greg Kroah-Hartman
Quoted 12 lines · Mark Brown

From: Mark Brown <[email protected]>

The sysrq field in struct uart_port is only defined when SERIAL_CORE_CONSOLE or SUPPORT_SYSRQ are selected but the driver uses the field unconditionally, causing build failures if they aren't (as happens when doing an arm64 allmodconfig). Make the usage conditional as well.

---
 drivers/tty/serial/xilinx_uartps.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 4 lines
Quoted 1 line

Is this a 3.13-final fix, or can it wait for 3.14?

I sent out pretty much the same fix a week ago:
https://lkml.org/lkml/2013/12/2/694

ah, sorry, missed that one somehow. I'll go queue this up...

greg k-h

author
#4 lore raw
In reply to Sören Brinkmann
Quoted 9 lines · Sören Brinkmann
Quoted 7 lines · Greg Kroah-Hartman
Quoted 5 lines · Mark Brown

The sysrq field in struct uart_port is only defined when SERIAL_CORE_CONSOLE or SUPPORT_SYSRQ are selected but the driver uses the field unconditionally, causing build failures if they aren't (as happens when doing an arm64 allmodconfig). Make the usage conditional as well.

Quoted 7 lines
Quoted 1 line

Is this a 3.13-final fix, or can it wait for 3.14?

I sent out pretty much the same fix a week ago:
https://lkml.org/lkml/2013/12/2/694

It seems to fix a broken build for certain configurations. Hence, I'd say it's a fix for 3.13.

Yeah, it's a definite build fail with an obvious fix. You do have to go looking for the issue and there's a simple workaround so it's not super critical but it's definitely -final material until very late in the cycle.