diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-13 19:09:25 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-13 19:12:05 +0200 |
commit | 45f38cb3b80311ade3c87000f7d7a8f6ebd60a43 (patch) | |
tree | 002524371b81008a600eaabb17c39e477ba385dd /drivers/media/pci/saa7134/saa7134-video.c | |
parent | [media] saa7134: replace remaining occurences or printk() (diff) | |
download | linux-45f38cb3b80311ade3c87000f7d7a8f6ebd60a43.tar.xz linux-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-video.c')
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-video.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 525ae6837fb3..f874b0c9fe4a 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -52,8 +52,10 @@ module_param_string(secam, secam, sizeof(secam), 0644); MODULE_PARM_DESC(secam, "force SECAM variant, either DK,L or Lc"); -#define video_dbg(fmt, arg...) if (video_debug & 0x04) \ - printk(KERN_DEBUG pr_fmt("video: " fmt), ## arg) +#define video_dbg(fmt, arg...) do { \ + if (video_debug & 0x04) \ + printk(KERN_DEBUG pr_fmt("video: " fmt), ## arg); \ + } while (0) /* ------------------------------------------------------------------ */ /* Defines for Video Output Port Register at address 0x191 */ |