[media] ttpci: cleanup debug macros and remove dead code
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 14 Oct 2016 10:58:43 +0000 (07:58 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 18 Nov 2016 11:40:43 +0000 (09:40 -0200)
Continuation lines without KERN_CONT won't work anymore.
However, the way dprintk() was defined leads to the usage
of continuation lines, with should be avoided when possible.

So, redefine those macros.

While hre, remove some dead code at av7110.c with also
relies on continuation lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ttpci/av7110.c
drivers/media/pci/ttpci/av7110.h
drivers/media/pci/ttpci/budget.h

index 37e7e6684e3ccbe613c2113ede347831ef314b77..6e63949d6ad0b7285d2fcc16e4640dfd54a4b063 100644 (file)
@@ -443,21 +443,6 @@ static void debiirq(unsigned long cookie)
 
        case DATA_COMMON_INTERFACE:
                CI_handle(av7110, (u8 *)av7110->debi_virt, av7110->debilen);
-#if 0
-       {
-               int i;
-
-               printk("av7110%d: ", av7110->num);
-               printk("%02x ", *(u8 *)av7110->debi_virt);
-               printk("%02x ", *(1+(u8 *)av7110->debi_virt));
-               for (i = 2; i < av7110->debilen; i++)
-                       printk("%02x ", (*(i+(unsigned char *)av7110->debi_virt)));
-               for (i = 2; i < av7110->debilen; i++)
-                       printk("%c", chtrans(*(i+(unsigned char *)av7110->debi_virt)));
-
-               printk("\n");
-       }
-#endif
                xfer = RX_BUFF;
                break;
 
index 3707ccd0273229c13dfd01112687c339852860eb..824c1e262fbbbf2a9debef453a2265f536dab5b3 100644 (file)
 
 extern int av7110_debug;
 
-#define dprintk(level,args...) \
-           do { if ((av7110_debug & level)) { printk("dvb-ttpci: %s(): ", __func__); printk(args); } } while (0)
+#define dprintk(level, fmt, arg...) do {                               \
+       if (level & av7110_debug)                                       \
+               printk(KERN_DEBUG KBUILD_MODNAME ": %s(): " fmt,        \
+                      __func__, ##arg);                                \
+} while (0)
 
 #define MAXFILT 32
 
index 655eef5236ca5a5266b3432437518959c27deaa4..d5ae4438153e59bbaeb2f5dbb428014bcdcd4b1d 100644 (file)
@@ -21,8 +21,12 @@ extern int budget_debug;
 #undef dprintk
 #endif
 
-#define dprintk(level,args...) \
-           do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __func__); printk(args); } } while (0)
+#define dprintk(level, fmt, arg...) do {                               \
+       if (level & budget_debug)                                       \
+               printk(KERN_DEBUG KBUILD_MODNAME ": %s(): " fmt,        \
+                      __func__, ##arg);                                \
+} while (0)
+
 
 struct budget_info {
        char *name;