tty: remove buf parameter from tty_name()
[firefly-linux-kernel-4.4.55.git] / drivers / tty / tty_io.c
index 1eaf0fbd99e45e0e1df8a198284347ec818ce5df..57fc6ee12332e6932472ac1cc1796d607f114e4f 100644 (file)
@@ -235,7 +235,6 @@ static void tty_del_file(struct file *file)
 /**
  *     tty_name        -       return tty naming
  *     @tty: tty structure
- *     @buf: unused
  *
  *     Convert a tty structure into a name. The name reflects the kernel
  *     naming policy and if udev is in use may not reflect user space
@@ -243,7 +242,7 @@ static void tty_del_file(struct file *file)
  *     Locking: none
  */
 
-const char *tty_name(const struct tty_struct *tty, char *buf)
+const char *tty_name(const struct tty_struct *tty)
 {
        if (!tty) /* Hmm.  NULL pointer.  That's fun. */
                return "NULL tty";
@@ -768,8 +767,7 @@ static void do_tty_hangup(struct work_struct *work)
 void tty_hangup(struct tty_struct *tty)
 {
 #ifdef TTY_DEBUG_HANGUP
-       char    buf[64];
-       printk(KERN_DEBUG "%s hangup...\n", tty_name(tty, buf));
+       printk(KERN_DEBUG "%s hangup...\n", tty_name(tty));
 #endif
        schedule_work(&tty->hangup_work);
 }
@@ -788,9 +786,7 @@ EXPORT_SYMBOL(tty_hangup);
 void tty_vhangup(struct tty_struct *tty)
 {
 #ifdef TTY_DEBUG_HANGUP
-       char    buf[64];
-
-       printk(KERN_DEBUG "%s vhangup...\n", tty_name(tty, buf));
+       printk(KERN_DEBUG "%s vhangup...\n", tty_name(tty));
 #endif
        __tty_hangup(tty, 0);
 }
@@ -829,9 +825,7 @@ void tty_vhangup_self(void)
 static void tty_vhangup_session(struct tty_struct *tty)
 {
 #ifdef TTY_DEBUG_HANGUP
-       char    buf[64];
-
-       printk(KERN_DEBUG "%s vhangup session...\n", tty_name(tty, buf));
+       printk(KERN_DEBUG "%s vhangup session...\n", tty_name(tty));
 #endif
        __tty_hangup(tty, 1);
 }
@@ -1767,7 +1761,6 @@ int tty_release(struct inode *inode, struct file *filp)
        struct tty_struct *o_tty = NULL;
        int     do_sleep, final;
        int     idx;
-       char    buf[64];
        long    timeout = 0;
        int     once = 1;
 
@@ -1791,7 +1784,7 @@ int tty_release(struct inode *inode, struct file *filp)
 
 #ifdef TTY_DEBUG_HANGUP
        printk(KERN_DEBUG "%s: %s (tty count=%d)...\n", __func__,
-                       tty_name(tty, buf), tty->count);
+                       tty_name(tty), tty->count);
 #endif
 
        if (tty->ops->close)
@@ -1842,7 +1835,7 @@ int tty_release(struct inode *inode, struct file *filp)
                if (once) {
                        once = 0;
                        printk(KERN_WARNING "%s: %s: read/write wait queue active!\n",
-                              __func__, tty_name(tty, buf));
+                              __func__, tty_name(tty));
                }
                schedule_timeout_killable(timeout);
                if (timeout < 120 * HZ)
@@ -1854,13 +1847,13 @@ int tty_release(struct inode *inode, struct file *filp)
        if (o_tty) {
                if (--o_tty->count < 0) {
                        printk(KERN_WARNING "%s: bad pty slave count (%d) for %s\n",
-                               __func__, o_tty->count, tty_name(o_tty, buf));
+                               __func__, o_tty->count, tty_name(o_tty));
                        o_tty->count = 0;
                }
        }
        if (--tty->count < 0) {
                printk(KERN_WARNING "%s: bad tty->count (%d) for %s\n",
-                               __func__, tty->count, tty_name(tty, buf));
+                               __func__, tty->count, tty_name(tty));
                tty->count = 0;
        }
 
@@ -1903,7 +1896,7 @@ int tty_release(struct inode *inode, struct file *filp)
                return 0;
 
 #ifdef TTY_DEBUG_HANGUP
-       printk(KERN_DEBUG "%s: %s: final close\n", __func__, tty_name(tty, buf));
+       printk(KERN_DEBUG "%s: %s: final close\n", __func__, tty_name(tty));
 #endif
        /*
         * Ask the line discipline code to release its structures
@@ -1914,7 +1907,8 @@ int tty_release(struct inode *inode, struct file *filp)
        tty_flush_works(tty);
 
 #ifdef TTY_DEBUG_HANGUP
-       printk(KERN_DEBUG "%s: %s: freeing structure...\n", __func__, tty_name(tty, buf));
+       printk(KERN_DEBUG "%s: %s: freeing structure...\n", __func__,
+              tty_name(tty));
 #endif
        /*
         * The release_tty function takes care of the details of clearing