summaryrefslogtreecommitdiff
path: root/drivers/mxc/ipu3/ipu_common.c
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2015-11-30 17:01:49 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:20:42 +0300
commitee2712214240b504c2cfbc8a4b461b4b870fbff2 (patch)
treeec3555a9008a3dcb1f46f79fcab80190c28f18ec /drivers/mxc/ipu3/ipu_common.c
parentead5d4f8f8a351c8fae69bc1ef6ce0d5b2ef1498 (diff)
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 <Ying.Liu@freescale.com>
Diffstat (limited to 'drivers/mxc/ipu3/ipu_common.c')
-rw-r--r--drivers/mxc/ipu3/ipu_common.c4
1 files changed, 2 insertions, 2 deletions
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)
{