#define BCM2048_FREQDEV_UNIT 10000
#define BCM2048_FREQV4L2_MULTI 625
-#define dev_to_v4l2(f) ((f * BCM2048_FREQDEV_UNIT) / BCM2048_FREQV4L2_MULTI)
-#define v4l2_to_dev(f) ((f * BCM2048_FREQV4L2_MULTI) / BCM2048_FREQDEV_UNIT)
+#define dev_to_v4l2(f) (((f) * BCM2048_FREQDEV_UNIT) / BCM2048_FREQV4L2_MULTI)
+#define v4l2_to_dev(f) (((f) * BCM2048_FREQV4L2_MULTI) / BCM2048_FREQDEV_UNIT)
-#define msb(x) ((u8)((u16)x >> 8))
-#define lsb(x) ((u8)((u16)x & 0x00FF))
-#define compose_u16(msb, lsb) (((u16)msb << 8) | lsb)
+#define msb(x) ((u8)((u16)(x) >> 8))
+#define lsb(x) ((u8)((u16)(x) & 0x00FF))
+#define compose_u16(msb, lsb) (((u16)(msb) << 8) | (lsb))
#define BCM2048_DEFAULT_POWERING_DELAY 20
#define BCM2048_DEFAULT_REGION 0x02
if (!bdev) \
return -ENODEV; \
\
- out = kzalloc(size + 1, GFP_KERNEL); \
+ out = kzalloc((size) + 1, GFP_KERNEL); \
if (!out) \
return -ENOMEM; \
\