* [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'
@ 2013-12-10 5:21 Chen Gang
0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang @ 2013-12-10 5:21 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Greg KH, James Hogan, linux-serial
Need check CONFIG_SERIAL_CORE_CONSOLE or SUPPORT_SYSRQ just like the
structure definiation has done. Or may cause compiling issue.
The related error (with allmodconfig for metag):
CC [M] drivers/tty/serial/xilinx_uartps.o
drivers/tty/serial/xilinx_uartps.c: In function 'xuartps_isr':
drivers/tty/serial/xilinx_uartps.c:247: error: 'struct uart_port' has no member named 'sysrq'
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
drivers/tty/serial/xilinx_uartps.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index e46e9f3..1501e6b 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -244,6 +244,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
* uart_handle_sysrq_char() doesn't work if
* spinlocked, for some reason
*/
+#if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)
if (port->sysrq) {
spin_unlock(&port->lock);
if (uart_handle_sysrq_char(port,
@@ -253,7 +254,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
}
spin_lock(&port->lock);
}
-
+#endif
port->icount.rx++;
if (isrstatus & XUARTPS_IXR_PARITY) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'
@ 2014-01-17 15:03 Chen Gang
2014-01-17 15:16 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Chen Gang @ 2014-01-17 15:03 UTC (permalink / raw)
To: jslaby; +Cc: gregkh, James Hogan, linux-serial
Hello Maintainers:
Please help check this patch, when you have time, thanks.
And now I find it is already fixed, but I still feel it can be
improved: "add defined(CONFIG_SERIAL_CORE_CONSOLE)".
Thanks.
-------- Original Message --------
Subject: [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'
Date: Tue, 10 Dec 2013 13:21:49 +0800
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Jiri Slaby <jslaby@suse.cz>
CC: Greg KH <gregkh@linuxfoundation.org>, James Hogan <james.hogan@imgtec.com>, linux-serial@vger.kernel.org
Need check CONFIG_SERIAL_CORE_CONSOLE or SUPPORT_SYSRQ just like the
structure definiation has done. Or may cause compiling issue.
The related error (with allmodconfig for metag):
CC [M] drivers/tty/serial/xilinx_uartps.o
drivers/tty/serial/xilinx_uartps.c: In function 'xuartps_isr':
drivers/tty/serial/xilinx_uartps.c:247: error: 'struct uart_port' has no member named 'sysrq'
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
drivers/tty/serial/xilinx_uartps.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index e46e9f3..1501e6b 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -244,6 +244,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
* uart_handle_sysrq_char() doesn't work if
* spinlocked, for some reason
*/
+#if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)
if (port->sysrq) {
spin_unlock(&port->lock);
if (uart_handle_sysrq_char(port,
@@ -253,7 +254,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
}
spin_lock(&port->lock);
}
-
+#endif
port->icount.rx++;
if (isrstatus & XUARTPS_IXR_PARITY) {
--
1.7.7.6
Thanks.
--
Chen Gang
Open, share and attitude like air, water and life which God blessed
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'
2014-01-17 15:03 [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq' Chen Gang
@ 2014-01-17 15:16 ` Greg KH
2014-01-18 9:25 ` Chen Gang
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2014-01-17 15:16 UTC (permalink / raw)
To: Chen Gang; +Cc: jslaby, James Hogan, linux-serial
On Fri, Jan 17, 2014 at 11:03:56PM +0800, Chen Gang wrote:
> Hello Maintainers:
>
> Please help check this patch, when you have time, thanks.
>
> And now I find it is already fixed, but I still feel it can be
> improved: "add defined(CONFIG_SERIAL_CORE_CONSOLE)".
What do you mean by this?
What can I do with this patch, it's not in a format I can apply it in,
and you say it's not needed anymore, so I guess I'll just delete it :(
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'
2014-01-17 15:16 ` Greg KH
@ 2014-01-18 9:25 ` Chen Gang
0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang @ 2014-01-18 9:25 UTC (permalink / raw)
To: Greg KH; +Cc: jslaby, James Hogan, linux-serial
On 01/17/2014 11:16 PM, Greg KH wrote:
> On Fri, Jan 17, 2014 at 11:03:56PM +0800, Chen Gang wrote:
>> Hello Maintainers:
>>
>> Please help check this patch, when you have time, thanks.
>>
>> And now I find it is already fixed, but I still feel it can be
>> improved: "add defined(CONFIG_SERIAL_CORE_CONSOLE)".
>
> What do you mean by this?
>
Excuse me, I did not say quite clear enough originally.
What I mean is:
------------------------patch begin---------------------------------
drivers: tty: serial: xilinx_uartps: add CONFIG_SERIAL_CORE_CONSOLE switch macro
For structure member 'sysrq', the related header defines it when "#if
defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)", so need
add CONFIG_SERIAL_CORE_CONSOLE for consistency.
The related patch is
"c2db11e tty: xuartps: Properly guard sysrq specific code"
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
drivers/tty/serial/xilinx_uartps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index f619ad5..17de380 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -240,7 +240,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
continue;
}
-#ifdef SUPPORT_SYSRQ
+#if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)
/*
* uart_handle_sysrq_char() doesn't work if
* spinlocked, for some reason
--
1.7.11.7
------------------------patch end-------------------------------------
> What can I do with this patch, it's not in a format I can apply it in,
> and you say it's not needed anymore, so I guess I'll just delete it :(
>
> greg k-h
>
Thanks.
--
Chen Gang
Open, share and attitude like air, water and life which God blessed
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-18 9:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17 15:03 [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq' Chen Gang
2014-01-17 15:16 ` Greg KH
2014-01-18 9:25 ` Chen Gang
-- strict thread matches above, loose matches on Subject: below --
2013-12-10 5:21 Chen Gang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).