aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2020-06-10 17:22:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-27 16:16:37 +0200
commit225385657b7d81a99e17e04cd01f9ed5bb3109a8 (patch)
tree08c391cfb16108cc9adbc18cbe20d11485046bf2 /include/linux/serial_core.h
parentserial: core: fix sysrq overhead regression (diff)
downloadlinux-dev-225385657b7d81a99e17e04cd01f9ed5bb3109a8.tar.xz
linux-dev-225385657b7d81a99e17e04cd01f9ed5bb3109a8.zip
serial: core: drop redundant sysrq checks
The sysrq timestamp will never be set unless port->has_sysrq is set (see uart_handle_break()) so drop the redundant checks that were added by commit 1997e9dfdc84 ("serial_core: Un-ifdef sysrq SUPPORT_SYSRQ"). Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://lore.kernel.org/r/20200610152232.16925-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r--include/linux/serial_core.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 03fa7b967103..791f4844efeb 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -469,7 +469,7 @@ bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch);
static inline int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
{
- if (!port->has_sysrq || !port->sysrq)
+ if (!port->sysrq)
return 0;
if (ch && time_before(jiffies, port->sysrq)) {
@@ -488,7 +488,7 @@ static inline int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch
static inline int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch)
{
- if (!port->has_sysrq || !port->sysrq)
+ if (!port->sysrq)
return 0;
if (ch && time_before(jiffies, port->sysrq)) {