Skip to contentSkip to conversation

drivers/staging/dgnc: Updating dev_dbg function

PATCH In review Pushkar Jambhlekar 2 participants 2 messages Mar 22, 2017 – Mar 23, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/staging/dgnc: Updating dev_dbg function

Making use of __func__ instead of using function name directly in dev_dbg.

---
 drivers/staging/dgnc/dgnc_tty.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/dgnc/dgnc_tty.c +2 -2
index f7e754e..b0c88b8 100644
@@ -1858,13 +1858,13 @@ static void dgnc_tty_send_xchar(struct tty_struct *tty, char c)
 	if (!bd || bd->magic != DGNC_BOARD_MAGIC)
 		return;
 
-	dev_dbg(tty->dev, "dgnc_tty_send_xchar start\n");
+	dev_dbg(tty->dev, "%s start\n", __func__);
 
 	spin_lock_irqsave(&ch->ch_lock, flags);
 	bd->bd_ops->send_immediate_char(ch, c);
 	spin_unlock_irqrestore(&ch->ch_lock, flags);
 
-	dev_dbg(tty->dev, "dgnc_tty_send_xchar finish\n");
+	dev_dbg(tty->dev, "%s finish\n", __func__);
 }
 
 /* Return modem signals to ld. */
Signature · 1 line
2.7.4
#1 lore raw
Quoted 12 lines · Pushkar Jambhlekar

Making use of __func__ instead of using function name directly in dev_dbg.

---
 drivers/staging/dgnc/dgnc_tty.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/dgnc/dgnc_tty.c +0 -0
index f7e754e..b0c88b8 100644

drivers/staging/dgnc/dgnc_tty.c static void dgnc_tty_send_xchar(struct tty_struct *tty, char c) · line 1861

Quoted 5 lines
drivers/staging/dgnc/dgnc_tty.c +1 -1
@@ -1858,13 +1858,13 @@ static void dgnc_tty_send_xchar(struct tty_struct *tty, char c)
 	if (!bd || bd->magic != DGNC_BOARD_MAGIC)
 		return;
 
-	dev_dbg(tty->dev, "dgnc_tty_send_xchar start\n");
+	dev_dbg(tty->dev, "%s start\n", __func__);

As I stated on the mailing list a few days ago, these lines need to just be deleted entirely, as we have ftrace to help with this type of thing.

thanks,

greg k-h