[PATCH 06/13] tty: remove tty_info_ratelimited()

From: Greg Kroah-Hartman
Date: Thu Apr 08 2021 - 08:52:29 EST


Remove the one user of tty_info_ratelimited() and replace it with a
calls to dev_info_ratelimited() which provides more information about
the tty that has the error and uses the standard formatting logic.

Cc: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Cc: Jiri Slaby <jirislaby@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/tty/tty.h | 3 ---
drivers/tty/tty_io.c | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/tty/tty.h b/drivers/tty/tty.h
index 45b15cc250e8..a2084b58d4f3 100644
--- a/drivers/tty/tty.h
+++ b/drivers/tty/tty.h
@@ -11,7 +11,4 @@

#define tty_debug(tty, f, ...) tty_msg(pr_debug, tty, f, ##__VA_ARGS__)

-#define tty_info_ratelimited(tty, f, ...) \
- tty_msg(pr_info_ratelimited, tty, f, ##__VA_ARGS__)
-
#endif
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 2c3efa854ba5..91062fcc6667 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1477,7 +1477,7 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
/* call the tty release_tty routine to clean out this slot */
err_release_tty:
tty_ldisc_unlock(tty);
- tty_info_ratelimited(tty, "ldisc open failed (%d), clearing slot %d\n",
+ dev_info_ratelimited(tty->dev, "ldisc open failed (%d), clearing slot %d\n",
retval, idx);
err_release_lock:
tty_unlock(tty);
--
2.31.1