diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-13 14:09:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-13 14:12:05 -0300 |
commit | 45f38cb3b80311ade3c87000f7d7a8f6ebd60a43 (patch) | |
tree | 002524371b81008a600eaabb17c39e477ba385dd /drivers/media/pci/saa7134/saa7134-input.c | |
parent | 2bb3e2eec50c4cc7e0aefc4ef4cc9a1c371038ae (diff) | |
download | lwn-45f38cb3b80311ade3c87000f7d7a8f6ebd60a43.tar.gz lwn-45f38cb3b80311ade3c87000f7d7a8f6ebd60a43.zip |
[media] saa7134: avoid complex macro warnings
The debug macros are not properly defined, as they generate warnings
like:
ERROR: Macros with complex values should be enclosed in parentheses
+#define core_dbg(fmt, arg...) if (core_debug) \
+ printk(KERN_DEBUG pr_fmt("core: " fmt), ## arg)
Use do { } while (0) for those macros.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/saa7134/saa7134-input.c')
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-input.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-input.c b/drivers/media/pci/saa7134/saa7134-input.c index c6036557b468..e92bcfe9bbcb 100644 --- a/drivers/media/pci/saa7134/saa7134-input.c +++ b/drivers/media/pci/saa7134/saa7134-input.c @@ -41,10 +41,14 @@ static int pinnacle_remote; module_param(pinnacle_remote, int, 0644); /* Choose Pinnacle PCTV remote */ MODULE_PARM_DESC(pinnacle_remote, "Specify Pinnacle PCTV remote: 0=coloured, 1=grey (defaults to 0)"); -#define input_dbg(fmt, arg...) if (ir_debug) \ - printk(KERN_DEBUG pr_fmt("input: " fmt), ## arg) -#define ir_dbg(ir, fmt, arg...) if (ir_debug) \ - printk(KERN_DEBUG pr_fmt("ir %s: " fmt), ir->name, ## arg) +#define input_dbg(fmt, arg...) do { \ + if (ir_debug) \ + printk(KERN_DEBUG pr_fmt("input: " fmt), ## arg); \ + } while (0) +#define ir_dbg(ir, fmt, arg...) do { \ + if (ir_debug) \ + printk(KERN_DEBUG pr_fmt("ir %s: " fmt), ir->name, ## arg); \ + } while (0) /* Helper function for raw decoding at GPIO16 or GPIO18 */ static int saa7134_raw_decode_irq(struct saa7134_dev *dev); |