[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210408125134.3016837-4-gregkh@linuxfoundation.org>
Date: Thu, 8 Apr 2021 14:51:24 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Jiri Slaby <jirislaby@...nel.org>
Subject: [PATCH 03/13] tty: remove tty_err()
Remove the 2 users of tty_err() and replace it with calls to dev_err()
which provides more information about the tty that has the error and
uses the standard formatting logic.
Cc: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: Jiri Slaby <jirislaby@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/tty/n_tty.c | 2 +-
drivers/tty/tty.h | 1 -
drivers/tty/tty_io.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index ff1b3154ba0c..dbe208342258 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -1483,7 +1483,7 @@ n_tty_receive_char_flagged(struct tty_struct *tty, unsigned char c, char flag)
n_tty_receive_overrun(tty);
break;
default:
- tty_err(tty, "unknown flag %d\n", flag);
+ dev_err(tty->dev, "unknown flag %d\n", flag);
break;
}
}
diff --git a/drivers/tty/tty.h b/drivers/tty/tty.h
index 75624d7d84ae..eda037c48317 100644
--- a/drivers/tty/tty.h
+++ b/drivers/tty/tty.h
@@ -12,7 +12,6 @@
#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_err(tty, f, ...) tty_msg(pr_err, tty, f, ##__VA_ARGS__)
#define tty_info_ratelimited(tty, f, ...) \
tty_msg(pr_info_ratelimited, tty, f, ##__VA_ARGS__)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index c95f72085cdb..f8b96f3674af 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1124,7 +1124,7 @@ static ssize_t file_tty_write(struct file *file, struct kiocb *iocb, struct iov_
return -EIO;
/* Short term debug to catch buggy drivers */
if (tty->ops->write_room == NULL)
- tty_err(tty, "missing write_room method\n");
+ dev_err(tty->dev, "missing write_room method\n");
ld = tty_ldisc_ref_wait(tty);
if (!ld)
return hung_up_tty_write(iocb, from);
--
2.31.1
Powered by blists - more mailing lists