All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Johan Hovold <johan@kernel.org>
Subject: [PATCH v2 3/3] serial: core: drop redundant sysrq checks
Date: Wed, 10 Jun 2020 17:22:32 +0200	[thread overview]
Message-ID: <20200610152232.16925-4-johan@kernel.org> (raw)
In-Reply-To: <20200610152232.16925-1-johan@kernel.org>

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


  parent reply	other threads:[~2020-06-10 15:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 15:22 [PATCH v2 0/3] serial: core: fix up sysrq regressions Johan Hovold
2020-06-10 15:22 ` [PATCH v2 1/3] Revert "serial: core: Refactor uart_unlock_and_check_sysrq()" Johan Hovold
2020-06-10 15:22 ` [PATCH v2 2/3] serial: core: fix sysrq overhead regression Johan Hovold
2020-06-10 16:24   ` Dmitry Safonov
2020-06-12 15:29     ` Johan Hovold
2020-06-12 15:42       ` Dmitry Safonov
2020-06-12 15:52   ` Dmitry Safonov
2020-06-10 15:22 ` Johan Hovold [this message]
2020-06-12 15:55   ` [PATCH v2 3/3] serial: core: drop redundant sysrq checks Dmitry Safonov
2020-06-10 16:21 ` [PATCH v2 0/3] serial: core: fix up sysrq regressions Andy Shevchenko
2020-06-12 15:31   ` Johan Hovold
2020-06-27 14:16 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200610152232.16925-4-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=0x7f454c46@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.