Skip to content

Commit 2253856

Browse files
jhovoldgregkh
authored andcommitted
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 1997e9d ("serial_core: Un-ifdef sysrq SUPPORT_SYSRQ"). Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Dmitry Safonov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 08d5470 commit 2253856

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/serial_core.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch);
469469

470470
static inline int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
471471
{
472-
if (!port->has_sysrq || !port->sysrq)
472+
if (!port->sysrq)
473473
return 0;
474474

475475
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
488488

489489
static inline int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch)
490490
{
491-
if (!port->has_sysrq || !port->sysrq)
491+
if (!port->sysrq)
492492
return 0;
493493

494494
if (ch && time_before(jiffies, port->sysrq)) {

0 commit comments

Comments
 (0)