public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
	linux-kernel@vger.kernel.org,
	Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH 11/14] tty: core: Prefer pr_* to printk(*)
Date: Sun,  8 Nov 2015 13:01:18 -0500	[thread overview]
Message-ID: <1447005681-4912-12-git-send-email-peter@hurleysoftware.com> (raw)
In-Reply-To: <1447005681-4912-1-git-send-email-peter@hurleysoftware.com>

Convert remaining printk() use to pr_*() when tty is unknown or
unsafe to use.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 drivers/tty/tty_io.c    | 6 ++----
 drivers/tty/tty_ioctl.c | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index b26b83b..04e8b56 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -268,14 +268,12 @@ static int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
 {
 #ifdef TTY_PARANOIA_CHECK
 	if (!tty) {
-		printk(KERN_WARNING
-			"null TTY for (%d:%d) in %s\n",
+		pr_warn("(%d:%d): %s: NULL tty\n",
 			imajor(inode), iminor(inode), routine);
 		return 1;
 	}
 	if (tty->magic != TTY_MAGIC) {
-		printk(KERN_WARNING
-			"bad magic number for tty struct (%d:%d) in %s\n",
+		pr_warn("(%d:%d): %s: bad magic number\n",
 			imajor(inode), iminor(inode), routine);
 		return 1;
 	}
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 4957e4c..6063912 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -458,10 +458,8 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,
 	if (ifound == -1 && (ibaud != obaud || ibinput))
 		termios->c_cflag |= (BOTHER << IBSHIFT);
 #else
-	if (ifound == -1 || ofound == -1) {
-		printk_once(KERN_WARNING "tty: Unable to return correct "
-			  "speed data as your architecture needs updating.\n");
-	}
+	if (ifound == -1 || ofound == -1)
+		pr_warn_once("tty: Unable to return correct speed data as your architecture needs updating.\n");
 #endif
 }
 EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
-- 
2.6.3


  parent reply	other threads:[~2015-11-08 18:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-08 18:01 [PATCH 00/14] tty core printk cleanup Peter Hurley
2015-11-08 18:01 ` [PATCH 01/14] tty: Improve tty_debug() macro Peter Hurley
2015-11-08 18:51   ` Joe Perches
2015-11-08 19:30     ` Peter Hurley
2015-11-08 19:33       ` Joe Perches
2015-11-08 18:01 ` [PATCH 02/14] tty: Make tty_paranoia_check() file scope Peter Hurley
2015-11-08 18:01 ` [PATCH 03/14] tty: synclink_gt: Rename tty_driver_name Peter Hurley
2015-11-08 18:01 ` [PATCH 04/14] tty: core: Remove redundant oom message Peter Hurley
2015-11-08 18:01 ` [PATCH 05/14] tty: core: Add helper fn to deref tty driver name Peter Hurley
2015-11-08 18:01 ` [PATCH 06/14] tty: Define tty_*() printk macros Peter Hurley
2015-11-08 18:01 ` [PATCH 07/14] tty: Convert SAK messages to tty_notice() Peter Hurley
2015-11-08 18:01 ` [PATCH 08/14] tty: core: Add driver name to invalid device registration message Peter Hurley
2015-11-08 18:01 ` [PATCH 09/14] tty: core: Refactor parameters for unset_locked_termios() helper Peter Hurley
2015-11-08 18:01 ` [PATCH 10/14] tty: Remove unset_locked_termios() error message Peter Hurley
2015-11-08 18:01 ` Peter Hurley [this message]
2015-11-08 18:01 ` [PATCH 12/14] tty: Remove __func__ from tty_debug() macro Peter Hurley
2015-11-08 18:01 ` [PATCH 13/14] tty: Merge conditional + error message + WARN_ON() Peter Hurley
2015-11-08 18:01 ` [PATCH 14/14] tty: core: Prefer dev_dbg() over pr_debug() Peter Hurley

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=1447005681-4912-12-git-send-email-peter@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox