From: Jiri Slaby <jslaby@suse.cz>
To: gregkh@suse.de
Cc: jirislaby@gmail.com, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org, Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH v2 6/6] TTY: mxser+cyclades remove wait_until_sent debug code
Date: Thu, 14 Jul 2011 14:35:15 +0200 [thread overview]
Message-ID: <1310646915-3032-6-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1310646915-3032-1-git-send-email-jslaby@suse.cz>
It makes the code really ugly. And since it can be enabled only before
building and only in the source files, it can be barely used by users.
That said, I've not seen anybody to use it in the past few years.
This crap is copied to some more drivers over the tty tree. Since I'm
not their maintainer, I'm not sure if I should remove them too?
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/cyclades.c | 12 +-----------
drivers/tty/mxser.c | 13 +------------
2 files changed, 2 insertions(+), 23 deletions(-)
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index c0e8f2e..5beef49 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -45,7 +45,6 @@
#undef CY_DEBUG_IO
#undef CY_DEBUG_COUNT
#undef CY_DEBUG_DTR
-#undef CY_DEBUG_WAIT_UNTIL_SENT
#undef CY_DEBUG_INTERRUPTS
#undef CY_16Y_HACK
#undef CY_ENABLE_MONITORING
@@ -1678,16 +1677,10 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
*/
if (!timeout || timeout > 2 * info->timeout)
timeout = 2 * info->timeout;
-#ifdef CY_DEBUG_WAIT_UNTIL_SENT
- printk(KERN_DEBUG "In cy_wait_until_sent(%d) check=%d, jiff=%lu...",
- timeout, char_time, jiffies);
-#endif
+
card = info->card;
if (!cy_is_Z(card)) {
while (cyy_readb(info, CySRER) & CyTxRdy) {
-#ifdef CY_DEBUG_WAIT_UNTIL_SENT
- printk(KERN_DEBUG "Not clean (jiff=%lu)...", jiffies);
-#endif
if (msleep_interruptible(jiffies_to_msecs(char_time)))
break;
if (timeout && time_after(jiffies, orig_jiffies +
@@ -1697,9 +1690,6 @@ static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
}
/* Run one more char cycle */
msleep_interruptible(jiffies_to_msecs(char_time * 5));
-#ifdef CY_DEBUG_WAIT_UNTIL_SENT
- printk(KERN_DEBUG "Clean (jiff=%lu)...done\n", jiffies);
-#endif
}
static void cy_flush_buffer(struct tty_struct *tty)
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 7fc8c02..8998d52 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -2005,16 +2005,9 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout)
*/
if (!timeout || timeout > 2 * info->timeout)
timeout = 2 * info->timeout;
-#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
- printk(KERN_DEBUG "In rs_wait_until_sent(%d) check=%lu...",
- timeout, char_time);
- printk("jiff=%lu...", jiffies);
-#endif
+
spin_lock_irqsave(&info->slock, flags);
while (!((lsr = inb(info->ioaddr + UART_LSR)) & UART_LSR_TEMT)) {
-#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
- printk("lsr = %d (jiff=%lu)...", lsr, jiffies);
-#endif
spin_unlock_irqrestore(&info->slock, flags);
schedule_timeout_interruptible(char_time);
spin_lock_irqsave(&info->slock, flags);
@@ -2025,10 +2018,6 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout)
}
spin_unlock_irqrestore(&info->slock, flags);
set_current_state(TASK_RUNNING);
-
-#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
- printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies);
-#endif
}
/*
--
1.7.6
next prev parent reply other threads:[~2011-07-14 12:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 12:35 [PATCH v2 1/6] TTY: serial, remove BTM from wait_until_sent Jiri Slaby
2011-07-14 12:35 ` [PATCH v2 2/6] TTY: msm_serial, remove unneeded console set Jiri Slaby
2011-07-14 12:35 ` [PATCH v2 3/6] TTY: serial, remove tasklet for tty_wakeup Jiri Slaby
2011-07-19 16:34 ` Alan Cox
2011-08-31 14:43 ` Jiri Slaby
2011-07-14 12:35 ` [PATCH v2 4/6] TTY: ami_serial, remove BTM from wait_until_sent Jiri Slaby
2011-07-14 12:35 ` [PATCH v2 5/6] TTY: remove tty_locked Jiri Slaby
2011-07-19 16:35 ` Alan Cox
2011-07-14 12:35 ` Jiri Slaby [this message]
2011-07-14 13:24 ` [PATCH v2 1/6] TTY: serial, remove BTM from wait_until_sent Arnd Bergmann
2011-07-19 0:35 ` Andreas Bombe
2011-08-08 13:21 ` Jiri Slaby
2011-08-10 1:09 ` Andreas Bombe
2011-08-10 9:46 ` Jiri Slaby
2011-08-10 12:25 ` Andreas Bombe
2011-08-10 14:43 ` Jiri Slaby
2011-08-10 18:07 ` Andreas Bombe
2011-08-10 18:10 ` Jiri Slaby
2011-08-11 1:06 ` Andreas Bombe
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=1310646915-3032-6-git-send-email-jslaby@suse.cz \
--to=jslaby@suse.cz \
--cc=gregkh@suse.de \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@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;
as well as URLs for NNTP newsgroup(s).