Skip to content

Commit

Permalink
serial: core: drop redundant sysrq checks
Browse files Browse the repository at this point in the history
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 1997e9d ("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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Jun 27, 2020
1 parent 08d5470 commit 2253856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/serial_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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)) {
Expand Down

0 comments on commit 2253856

Please sign in to comment.