Skip to contentSkip to conversation

drivers: pcmcia: This patch fix the following checkpatch warning.

PATCH In review Mohan Kumar 2 participants 2 messages Apr 16, 2019 – Apr 17, 2019 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: pcmcia: This patch fix the following checkpatch warning.

Switch hardcoded function name with a reference to __func__ making the code more maintainable

WARNING: Prefer using '"%s...", __func__' to using function's name, in a string

---
 drivers/pcmcia/tcic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pcmcia/tcic.c +2 -2
index 1a0e3f0987..fc653e7 100644
@@ -540,7 +540,7 @@ static irqreturn_t tcic_interrupt(int irq, void *dev)
     } else
 	active = 1;
 
-    pr_debug("tcic_interrupt()\n");
+    pr_debug("%s()\n", __func__);
     
     for (i = 0; i < sockets; i++) {
 	psock = socket_table[i].psock;
@@ -583,7 +583,7 @@ static irqreturn_t tcic_interrupt(int irq, void *dev)
 
 static void tcic_timer(struct timer_list *unused)
 {
-    pr_debug("tcic_timer()\n");
+    pr_debug("%s()\n", __func__);
     tcic_timer_pending = 0;
     tcic_interrupt(0, NULL);
 } /* tcic_timer */
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · Mohan Kumar

Switch hardcoded function name with a reference to __func__ making the code more maintainable

Thanks for your patch. Are there any other patches pending to this driver?

As noted in Kconfig, the TCIC host briges "are only found on a handful of old systems". Therefore, I am a bit reluctant to apply this patch, especially as the much more in this file does not adhere to current kernel CodingStyle practices.

Thanks,
Dominik