[PATCH 11/18] V4L/DVB (4740): Fixed an if-block to avoid floatingwith debug-messages

From: mchehab
Date: Sat Oct 14 2006 - 08:11:50 EST



From: Enrico Scholz <enrico.scholz@xxxxxxxxxxxxxxxxxxxxxxxxx>

The dbgarg() macro in videodev.c contains some printk() statements
where only the first one is influenced by an if-statement. This causes
floating with debug-messages which is fixed by this patch by adding a
'{ ... }' pair.

Signed-off-by: Enrico Scholz <enrico.scholz@xxxxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
---

drivers/media/video/videodev.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 479a067..98de872 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -17,10 +17,11 @@
*/

#define dbgarg(cmd, fmt, arg...) \
- if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \
+ if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) { \
printk (KERN_DEBUG "%s: ", vfd->name); \
v4l_printk_ioctl(cmd); \
- printk (KERN_DEBUG "%s: " fmt, vfd->name, ## arg);
+ printk (KERN_DEBUG "%s: " fmt, vfd->name, ## arg); \
+ }

#define dbgarg2(fmt, arg...) \
if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/