aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-11-08 13:01:19 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-13 22:59:48 -0500
commitd435cefe9cbc9308cac8d4b19069a572e2bd1558 (patch)
treeb632888b6642fd2007d7f4d76d7deb06ad5d45e1 /drivers/tty
parent89222e62662237faee90cd8486d23350f26b181d (diff)
tty: Remove __func__ from tty_debug() macro
Now that tty_debug() macro uses pr_debug(), the function name can be printed when using dynamic debug; printing the function name within the format string is redundant. Remove the __func__ parameter and print specifier from the format string. Add context to messages for when the function name is not printed by dynamic debug, or when dynamic debug is not enabled. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/pty.c2
-rw-r--r--drivers/tty/tty_io.c14
-rw-r--r--drivers/tty/tty_ioctl.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index a45660f62db5..b3110040164a 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -788,7 +788,7 @@ static int ptmx_open(struct inode *inode, struct file *filp)
788 if (retval) 788 if (retval)
789 goto err_release; 789 goto err_release;
790 790
791 tty_debug_hangup(tty, "(tty count=%d)\n", tty->count); 791 tty_debug_hangup(tty, "opening (count=%d)\n", tty->count);
792 792
793 tty_unlock(tty); 793 tty_unlock(tty);
794 return 0; 794 return 0;
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index d9df15f1086b..f8e1fce9bdfd 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -783,7 +783,7 @@ static void do_tty_hangup(struct work_struct *work)
783 783
784void tty_hangup(struct tty_struct *tty) 784void tty_hangup(struct tty_struct *tty)
785{ 785{
786 tty_debug_hangup(tty, "\n"); 786 tty_debug_hangup(tty, "hangup\n");
787 schedule_work(&tty->hangup_work); 787 schedule_work(&tty->hangup_work);
788} 788}
789 789
@@ -800,7 +800,7 @@ EXPORT_SYMBOL(tty_hangup);
800 800
801void tty_vhangup(struct tty_struct *tty) 801void tty_vhangup(struct tty_struct *tty)
802{ 802{
803 tty_debug_hangup(tty, "\n"); 803 tty_debug_hangup(tty, "vhangup\n");
804 __tty_hangup(tty, 0); 804 __tty_hangup(tty, 0);
805} 805}
806 806
@@ -837,7 +837,7 @@ void tty_vhangup_self(void)
837 837
838static void tty_vhangup_session(struct tty_struct *tty) 838static void tty_vhangup_session(struct tty_struct *tty)
839{ 839{
840 tty_debug_hangup(tty, "\n"); 840 tty_debug_hangup(tty, "session hangup\n");
841 __tty_hangup(tty, 1); 841 __tty_hangup(tty, 1);
842} 842}
843 843
@@ -1787,7 +1787,7 @@ int tty_release(struct inode *inode, struct file *filp)
1787 return 0; 1787 return 0;
1788 } 1788 }
1789 1789
1790 tty_debug_hangup(tty, "(tty count=%d)...\n", tty->count); 1790 tty_debug_hangup(tty, "releasing (count=%d)\n", tty->count);
1791 1791
1792 if (tty->ops->close) 1792 if (tty->ops->close)
1793 tty->ops->close(tty, filp); 1793 tty->ops->close(tty, filp);
@@ -1903,7 +1903,7 @@ int tty_release(struct inode *inode, struct file *filp)
1903 /* Wait for pending work before tty destruction commmences */ 1903 /* Wait for pending work before tty destruction commmences */
1904 tty_flush_works(tty); 1904 tty_flush_works(tty);
1905 1905
1906 tty_debug_hangup(tty, "freeing structure...\n"); 1906 tty_debug_hangup(tty, "freeing structure\n");
1907 /* 1907 /*
1908 * The release_tty function takes care of the details of clearing 1908 * The release_tty function takes care of the details of clearing
1909 * the slots and preserving the termios structure. The tty_unlock_pair 1909 * the slots and preserving the termios structure. The tty_unlock_pair
@@ -2093,7 +2093,7 @@ retry_open:
2093 tty->driver->subtype == PTY_TYPE_MASTER) 2093 tty->driver->subtype == PTY_TYPE_MASTER)
2094 noctty = 1; 2094 noctty = 1;
2095 2095
2096 tty_debug_hangup(tty, "(tty count=%d)\n", tty->count); 2096 tty_debug_hangup(tty, "opening (count=%d)\n", tty->count);
2097 2097
2098 if (tty->ops->open) 2098 if (tty->ops->open)
2099 retval = tty->ops->open(tty, filp); 2099 retval = tty->ops->open(tty, filp);
@@ -2102,7 +2102,7 @@ retry_open:
2102 filp->f_flags = saved_flags; 2102 filp->f_flags = saved_flags;
2103 2103
2104 if (retval) { 2104 if (retval) {
2105 tty_debug_hangup(tty, "error %d, releasing...\n", retval); 2105 tty_debug_hangup(tty, "open error %d, releasing\n", retval);
2106 2106
2107 tty_unlock(tty); /* need to call tty_release without BTM */ 2107 tty_unlock(tty); /* need to call tty_release without BTM */
2108 tty_release(inode, filp); 2108 tty_release(inode, filp);
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 40964eaf115f..0ea351388724 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -216,7 +216,7 @@ int tty_unthrottle_safe(struct tty_struct *tty)
216 216
217void tty_wait_until_sent(struct tty_struct *tty, long timeout) 217void tty_wait_until_sent(struct tty_struct *tty, long timeout)
218{ 218{
219 tty_debug_wait_until_sent(tty, "\n"); 219 tty_debug_wait_until_sent(tty, "wait until sent, timeout=%ld\n", timeout);
220 220
221 if (!timeout) 221 if (!timeout)
222 timeout = MAX_SCHEDULE_TIMEOUT; 222 timeout = MAX_SCHEDULE_TIMEOUT;