lkml.org 
[lkml]   [2020]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 3/3] serial: core: drop redundant sysrq checks
Date
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>
---
include/linux/serial_core.h | 4 ++--
1 file 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)) {
--
2.26.2
\
 
 \ /
  Last update: 2020-06-10 17:24    [W:0.464 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site