tty: core: Prefer pr_* to printk(*)
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 8 Nov 2015 18:01:18 +0000 (13:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Dec 2015 03:59:48 +0000 (19:59 -0800)
Convert remaining printk() use to pr_*() when tty is unknown or
unsafe to use.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c
drivers/tty/tty_ioctl.c

index 86e379a38219a720ab8ffce6362024e11d4e399e..d9df15f1086b0df6cdd5c0449424822f6f865df8 100644 (file)
@@ -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;
        }
index e54879d1e6769647439506e7c316ae7fa6179846..40964eaf115fd9a11998ef2b430d89c74171bd85 100644 (file)
@@ -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);
This page took 0.031029 seconds and 5 git commands to generate.