]> Pileus Git - ~andy/linux/commitdiff
[media] cx23885-alsa: fix a false gcc warning at dprintk()
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 15:34:10 +0000 (12:34 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 20:01:49 +0000 (18:01 -0200)
Change dprintk logic to avoid the following warning:
drivers/media/pci/cx23885/cx23885-alsa.c: In function 'cx23885_audio_register':
drivers/media/pci/cx23885/cx23885-alsa.c:515:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

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

index 795169237e70aa3298763c34d393ae7c75b463d1..c6c9bd58f8be87426ed63200cfc729428e7b417b 100644 (file)
 
 #define AUDIO_SRAM_CHANNEL     SRAM_CH07
 
-#define dprintk(level, fmt, arg...)    if (audio_debug >= level) \
-       printk(KERN_INFO "%s: " fmt, chip->dev->name , ## arg)
+#define dprintk(level, fmt, arg...) do {                               \
+       if (audio_debug + 1 > level)                                    \
+               printk(KERN_INFO "%s: " fmt, chip->dev->name , ## arg); \
+} while(0)
 
 #define dprintk_core(level, fmt, arg...)       if (audio_debug >= level) \
        printk(KERN_DEBUG "%s: " fmt, chip->dev->name , ## arg)