linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/24] n_hdlc: remove tracing debug prints
@ 2020-02-19  8:40 Jiri Slaby
  2020-02-19  8:40 ` [PATCH 02/24] n_hdlc: remove unused macros Jiri Slaby
                   ` (22 more replies)
  0 siblings, 23 replies; 27+ messages in thread
From: Jiri Slaby @ 2020-02-19  8:40 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby

We can trace functions using ftrace, so there is no need for this
additional prints. Remove them.

We keep only those which print some additional info, not only function
name & "entry"/"exit".

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/n_hdlc.c | 32 ++------------------------------
 1 file changed, 2 insertions(+), 30 deletions(-)

diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index 27b506bf03ce..9e115ecf920d 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -232,10 +232,7 @@ static void n_hdlc_release(struct n_hdlc *n_hdlc)
 {
 	struct tty_struct *tty = n_hdlc2tty (n_hdlc);
 	struct n_hdlc_buf *buf;
-	
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_release() called\n",__FILE__,__LINE__);
-		
+
 	/* Ensure that the n_hdlcd process is not hanging on select()/poll() */
 	wake_up_interruptible (&tty->read_wait);
 	wake_up_interruptible (&tty->write_wait);
@@ -287,9 +284,6 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
 {
 	struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_tty_close() called\n",__FILE__,__LINE__);
-		
 	if (n_hdlc != NULL) {
 		if (n_hdlc->magic != HDLC_MAGIC) {
 			printk (KERN_WARNING"n_hdlc: trying to close unopened tty!\n");
@@ -309,10 +303,6 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
 			n_hdlc_release (n_hdlc);
 		}
 	}
-	
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_tty_close() success\n",__FILE__,__LINE__);
-		
 }	/* end of n_hdlc_tty_close() */
 
 /**
@@ -353,10 +343,7 @@ static int n_hdlc_tty_open (struct tty_struct *tty)
 	
 	/* flush receive data from driver */
 	tty_driver_flush_buffer(tty);
-		
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_tty_open() success\n",__FILE__,__LINE__);
-		
+
 	return 0;
 	
 }	/* end of n_tty_hdlc_open() */
@@ -376,8 +363,6 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 	unsigned long flags;
 	struct n_hdlc_buf *tbuf;
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_send_frames() called\n",__FILE__,__LINE__);
  check_again:
 		
  	spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock, flags);
@@ -447,10 +432,6 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 	
         if (n_hdlc->woke_up)
 	  goto check_again;
-
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_send_frames() exit\n",__FILE__,__LINE__);
-		
 }	/* end of n_hdlc_send_frames() */
 
 /**
@@ -463,9 +444,6 @@ static void n_hdlc_tty_wakeup(struct tty_struct *tty)
 {
 	struct n_hdlc *n_hdlc = tty2n_hdlc(tty);
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_tty_wakeup() called\n",__FILE__,__LINE__);
-		
 	if (!n_hdlc)
 		return;
 
@@ -564,9 +542,6 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 	struct n_hdlc_buf *rbuf;
 	DECLARE_WAITQUEUE(wait, current);
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_tty_read() called\n",__FILE__,__LINE__);
-		
 	/* Validate the pointers */
 	if (!n_hdlc)
 		return -EIO;
@@ -802,9 +777,6 @@ static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
 	struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
 	__poll_t mask = 0;
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_tty_poll() called\n",__FILE__,__LINE__);
-		
 	if (n_hdlc && n_hdlc->magic == HDLC_MAGIC && tty == n_hdlc->tty) {
 		/* queue current process into any wait queue that */
 		/* may awaken in the future (read and write) */
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2020-02-21  8:30 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19  8:40 [PATCH 01/24] n_hdlc: remove tracing debug prints Jiri Slaby
2020-02-19  8:40 ` [PATCH 02/24] n_hdlc: remove unused macros Jiri Slaby
2020-02-19  8:40 ` [PATCH 03/24] n_hdlc: convert debuglevel use to pr_debug Jiri Slaby
2020-02-19 12:20   ` Joe Perches
2020-02-20 12:45     ` Greg KH
2020-02-21  8:16     ` Jiri Slaby
2020-02-19  8:40 ` [PATCH 04/24] n_hdlc: put init/exit strings directly to prints Jiri Slaby
2020-02-19  8:40 ` [PATCH 05/24] n_hdlc: cleanup messages during registration Jiri Slaby
2020-02-19  8:41 ` [PATCH 06/24] n_hdlc: use clamp() for maxframe Jiri Slaby
2020-02-19  8:41 ` [PATCH 07/24] n_hdlc: simplify freeing of buffer list Jiri Slaby
2020-02-19  8:41 ` [PATCH 08/24] n_hdlc: invert conditions in n_hdlc_tty_close and n_hdlc_tty_poll Jiri Slaby
2020-02-19  8:41 ` [PATCH 09/24] n_hdlc: remove unused flags Jiri Slaby
2020-02-19  8:41 ` [PATCH 10/24] n_hdlc: remove unused backup_tty Jiri Slaby
2020-02-19  8:41 ` [PATCH 11/24] n_hdlc: expand tty2n_hdlc macro Jiri Slaby
2020-02-19  8:41 ` [PATCH 12/24] n_hdlc: inline n_hdlc_release Jiri Slaby
2020-02-19  8:41 ` [PATCH 13/24] n_hdlc: remove cached tty Jiri Slaby
2020-02-19  8:41 ` [PATCH 14/24] n_hdlc: remove checking of n_hdlc Jiri Slaby
2020-02-19  8:41 ` [PATCH 15/24] n_hdlc: add helper for buffers allocation Jiri Slaby
2020-02-19  8:41 ` [PATCH 16/24] n_hdlc: move tty_ldisc_ops to the bottom Jiri Slaby
2020-02-19  8:41 ` [PATCH 17/24] n_hdlc: switch tbusy and woke_up to bools Jiri Slaby
2020-02-19  8:41 ` [PATCH 18/24] n_hdlc: remove unneeded ifdef Jiri Slaby
2020-02-19  8:41 ` [PATCH 19/24] n_hdlc: use __func__ and pr_ print helpers Jiri Slaby
2020-02-19  8:41 ` [PATCH 20/24] n_hdlc: remove useless whitespace at line wraps Jiri Slaby
2020-02-19  8:41 ` [PATCH 21/24] n_hdlc: remove spaces between function name and ( Jiri Slaby
2020-02-19  8:41 ` [PATCH 22/24] n_hdlc: add missing spaces after commas Jiri Slaby
2020-02-19  8:41 ` [PATCH 23/24] n_hdlc: fix whitespace around binary operators Jiri Slaby
2020-02-19  8:41 ` [PATCH 24/24] n_hdlc: wrap a comment properly Jiri Slaby

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).