]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
[media] cx88: get rid of a warning at dprintk() macro
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 18:25:02 +0000 (15:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 28 Oct 2012 09:38:41 +0000 (07:38 -0200)
drivers/media/pci/cx88/cx88-mpeg.c: In function 'cx8802_mpeg_irq':
drivers/media/pci/cx88/cx88-mpeg.c:419:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-mpeg.c: In function 'cx8802_irq':
drivers/media/pci/cx88/cx88-mpeg.c:453:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-alsa.c: In function 'snd_cx88_create':
drivers/media/pci/cx88/cx88-alsa.c:818:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-alsa.c:837:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-alsa.c: In function 'cx88_audio_initdev':
drivers/media/pci/cx88/cx88-alsa.c:912:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_mbox_func':
drivers/media/pci/cx88/cx88-blackbird.c:327:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:333:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:360:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_find_mailbox':
drivers/media/pci/cx88/cx88-blackbird.c:421:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_load_firmware':
drivers/media/pci/cx88/cx88-blackbird.c:444:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:451:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:453:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:459:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:466:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:487:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:492:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:503:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c: In function 'blackbird_initialize_codec':
drivers/media/pci/cx88/cx88-blackbird.c:560:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:566:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
drivers/media/pci/cx88/cx88-blackbird.c:569:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/cx88/cx88-alsa.c
drivers/media/pci/cx88/cx88-blackbird.c
drivers/media/pci/cx88/cx88-mpeg.c

index 3aa6856ead3b2f13f71db61ee9ea329808c01be4..d2de1a913e1978343937682689f2096320169f41 100644 (file)
 #include "cx88.h"
 #include "cx88-reg.h"
 
-#define dprintk(level,fmt, arg...)     if (debug >= level) \
-       printk(KERN_INFO "%s/1: " fmt, chip->core->name , ## arg)
-
-#define dprintk_core(level,fmt, arg...)        if (debug >= level) \
-       printk(KERN_DEBUG "%s/1: " fmt, chip->core->name , ## arg)
+#define dprintk(level, fmt, arg...) do {                               \
+       if (debug + 1 > level)                                          \
+               printk(KERN_INFO "%s/1: " fmt, chip->core->name , ## arg);\
+} while(0)
+
+#define dprintk_core(level, fmt, arg...) do {                          \
+       if (debug + 1 > level)                                          \
+               printk(KERN_DEBUG "%s/1: " fmt, chip->core->name , ## arg);\
+} while(0)
 
 /****************************************************************************
        Data type declarations - Can be moded to a header file later
index 62184eb919e5d7563ab0c8d4a9c286c45131c92b..a6ff8a6f4fc09f90e1ffce5027839e575d41515a 100644 (file)
@@ -53,9 +53,10 @@ static unsigned int debug;
 module_param(debug,int,0644);
 MODULE_PARM_DESC(debug,"enable debug messages [blackbird]");
 
-#define dprintk(level,fmt, arg...)     if (debug >= level) \
-       printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg)
-
+#define dprintk(level, fmt, arg...) do {                                     \
+       if (debug + 1 > level)                                                \
+               printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg); \
+} while(0)
 
 /* ------------------------------------------------------------------ */
 
index 1b7e979b87d336df5c92aeaccbb2d73c132ca643..d46b008a46b86f4d2e2684cba33b650d2b12ff44 100644 (file)
@@ -45,11 +45,15 @@ static unsigned int debug;
 module_param(debug,int,0644);
 MODULE_PARM_DESC(debug,"enable debug messages [mpeg]");
 
-#define dprintk(level,fmt, arg...)     if (debug >= level) \
-       printk(KERN_DEBUG "%s/2-mpeg: " fmt, dev->core->name, ## arg)
-
-#define mpeg_dbg(level,fmt, arg...)    if (debug >= level) \
-       printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg)
+#define dprintk(level, fmt, arg...) do {                                      \
+       if (debug + 1 > level)                                                 \
+               printk(KERN_DEBUG "%s/2-mpeg: " fmt, dev->core->name, ## arg); \
+} while(0)
+
+#define mpeg_dbg(level, fmt, arg...) do {                                \
+       if (debug + 1 > level)                                            \
+               printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg); \
+} while(0)
 
 #if defined(CONFIG_MODULES) && defined(MODULE)
 static void request_module_async(struct work_struct *work)