From: Liu Ying Date: Mon, 30 Nov 2015 09:01:49 +0000 (+0800) Subject: MLK-11921-1 mxc IPUv3: common: Fix the macro idma_is_valid/idma_mask definitions X-Git-Tag: C0P2-H0.0--20200415~3993 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=b84c0c24b82b17a06068dbdecdc3ffa0da44af4d;p=linux.git MLK-11921-1 mxc IPUv3: common: Fix the macro idma_is_valid/idma_mask definitions This patch adds missing parentheses around the argument of the macro idma_is_valid and idma_mask to avoid any potential macro expansion issue. Signed-off-by: Liu Ying --- diff --git a/drivers/mxc/ipu3/ipu_common.c b/drivers/mxc/ipu3/ipu_common.c index 605b38fcf73c..d472ad442dc1 100644 --- a/drivers/mxc/ipu3/ipu_common.c +++ b/drivers/mxc/ipu3/ipu_common.c @@ -131,8 +131,8 @@ static inline uint32_t tri_cur_buf_shift(uint32_t dma_chan) return ffs(mask) - 1; } -#define idma_is_valid(ch) (ch != NO_DMA) -#define idma_mask(ch) (idma_is_valid(ch) ? (1UL << (ch & 0x1F)) : 0) +#define idma_is_valid(ch) ((ch) != NO_DMA) +#define idma_mask(ch) (idma_is_valid(ch) ? (1UL << ((ch) & 0x1F)) : 0) static inline bool idma_is_set(struct ipu_soc *ipu, uint32_t reg, uint32_t dma) {