From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Jiri Slaby <jirislaby@kernel.org>
Subject: [PATCH 04/13] tty: remove tty_notice()
Date: Thu, 8 Apr 2021 14:51:25 +0200 [thread overview]
Message-ID: <20210408125134.3016837-5-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20210408125134.3016837-1-gregkh@linuxfoundation.org>
Remove the 3 users of tty_notice() and replace them with calls to
dev_notice() which provides more information about the tty that has the
error and uses the standard formatting logic.
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/tty.h | 1 -
drivers/tty/tty_io.c | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/tty.h b/drivers/tty/tty.h
index eda037c48317..0323bc2cd6ba 100644
--- a/drivers/tty/tty.h
+++ b/drivers/tty/tty.h
@@ -10,7 +10,6 @@
fn("%s %s: " f, tty_driver_name(tty), tty_name(tty), ##__VA_ARGS__)
#define tty_debug(tty, f, ...) tty_msg(pr_debug, tty, f, ##__VA_ARGS__)
-#define tty_notice(tty, f, ...) tty_msg(pr_notice, tty, f, ##__VA_ARGS__)
#define tty_warn(tty, f, ...) tty_msg(pr_warn, tty, f, ##__VA_ARGS__)
#define tty_info_ratelimited(tty, f, ...) \
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index f8b96f3674af..0079ffd0cb9c 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -3059,7 +3059,7 @@ void __do_SAK(struct tty_struct *tty)
read_lock(&tasklist_lock);
/* Kill the entire session */
do_each_pid_task(session, PIDTYPE_SID, p) {
- tty_notice(tty, "SAK: killed process %d (%s): by session\n",
+ dev_notice(tty->dev, "SAK: killed process %d (%s): by session\n",
task_pid_nr(p), p->comm);
group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p, PIDTYPE_SID);
} while_each_pid_task(session, PIDTYPE_SID, p);
@@ -3067,7 +3067,7 @@ void __do_SAK(struct tty_struct *tty)
/* Now kill any processes that happen to have the tty open */
do_each_thread(g, p) {
if (p->signal->tty == tty) {
- tty_notice(tty, "SAK: killed process %d (%s): by controlling tty\n",
+ dev_notice(tty->dev, "SAK: killed process %d (%s): by controlling tty\n",
task_pid_nr(p), p->comm);
group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p, PIDTYPE_SID);
continue;
@@ -3075,7 +3075,7 @@ void __do_SAK(struct tty_struct *tty)
task_lock(p);
i = iterate_fd(p->files, 0, this_tty, tty);
if (i != 0) {
- tty_notice(tty, "SAK: killed process %d (%s): by fd#%d\n",
+ dev_notice(tty->dev, "SAK: killed process %d (%s): by fd#%d\n",
task_pid_nr(p), p->comm, i - 1);
group_send_sig_info(SIGKILL, SEND_SIG_PRIV, p, PIDTYPE_SID);
}
--
2.31.1
next prev parent reply other threads:[~2021-04-08 12:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 12:51 [PATCH 00/13] tty.h cleanups Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 01/13] tty: create internal tty.h file Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 02/13] tty: tty.h: remove tty_info() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 03/13] tty: remove tty_err() Greg Kroah-Hartman
2021-04-08 12:51 ` Greg Kroah-Hartman [this message]
2021-04-08 12:51 ` [PATCH 05/13] tty: remove tty_warn() Greg Kroah-Hartman
2021-04-08 13:47 ` Tetsuo Handa
2021-04-08 18:03 ` Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 06/13] tty: remove tty_info_ratelimited() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 07/13] tty: remove tty_debug() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 08/13] tty: audit: move some local functions out of tty.h Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 09/13] tty: move some internal tty lock enums and " Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 10/13] tty: make tty_release_redirect() static Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 11/13] tty: move some tty-only functions to drivers/tty/tty.h Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 12/13] tty: remove tty_driver_name() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 13/13] tty: clean include/linux/tty.h up Greg Kroah-Hartman
2021-04-08 17:51 ` Greg Kroah-Hartman
2021-04-08 14:25 ` [PATCH 00/13] tty.h cleanups Johan Hovold
2021-04-08 18:01 ` Greg Kroah-Hartman
2021-04-09 7:32 ` Johan Hovold
2021-04-15 8:21 ` Greg Kroah-Hartman
2021-04-15 14:14 ` Johan Hovold
2021-04-15 14:53 ` 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=20210408125134.3016837-5-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox