Commit 0562315b authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson

mmc: cqhci: Ensure macro parameters are wrapped in parentheses

Absence of parentheses is not affecting current code, but ensure macro
parameters are wrapped in parentheses.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: a4080225 ("mmc: cqhci: support for command queue enabled host")
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 126b6270
......@@ -61,9 +61,9 @@
#define CQHCI_IC_ENABLE BIT(31)
#define CQHCI_IC_RESET BIT(16)
#define CQHCI_IC_ICCTHWEN BIT(15)
#define CQHCI_IC_ICCTH(x) ((x & 0x1F) << 8)
#define CQHCI_IC_ICCTH(x) (((x) & 0x1F) << 8)
#define CQHCI_IC_ICTOVALWEN BIT(7)
#define CQHCI_IC_ICTOVAL(x) (x & 0x7F)
#define CQHCI_IC_ICTOVAL(x) ((x) & 0x7F)
/* task list base address */
#define CQHCI_TDLBA 0x20
......@@ -119,31 +119,31 @@
#define CQHCI_IC_DEFAULT_ICTOVAL 1
/* attribute fields */
#define CQHCI_VALID(x) ((x & 1) << 0)
#define CQHCI_END(x) ((x & 1) << 1)
#define CQHCI_INT(x) ((x & 1) << 2)
#define CQHCI_ACT(x) ((x & 0x7) << 3)
#define CQHCI_VALID(x) (((x) & 1) << 0)
#define CQHCI_END(x) (((x) & 1) << 1)
#define CQHCI_INT(x) (((x) & 1) << 2)
#define CQHCI_ACT(x) (((x) & 0x7) << 3)
/* data command task descriptor fields */
#define CQHCI_FORCED_PROG(x) ((x & 1) << 6)
#define CQHCI_CONTEXT(x) ((x & 0xF) << 7)
#define CQHCI_DATA_TAG(x) ((x & 1) << 11)
#define CQHCI_DATA_DIR(x) ((x & 1) << 12)
#define CQHCI_PRIORITY(x) ((x & 1) << 13)
#define CQHCI_QBAR(x) ((x & 1) << 14)
#define CQHCI_REL_WRITE(x) ((x & 1) << 15)
#define CQHCI_BLK_COUNT(x) ((x & 0xFFFF) << 16)
#define CQHCI_BLK_ADDR(x) ((x & 0xFFFFFFFF) << 32)
#define CQHCI_FORCED_PROG(x) (((x) & 1) << 6)
#define CQHCI_CONTEXT(x) (((x) & 0xF) << 7)
#define CQHCI_DATA_TAG(x) (((x) & 1) << 11)
#define CQHCI_DATA_DIR(x) (((x) & 1) << 12)
#define CQHCI_PRIORITY(x) (((x) & 1) << 13)
#define CQHCI_QBAR(x) (((x) & 1) << 14)
#define CQHCI_REL_WRITE(x) (((x) & 1) << 15)
#define CQHCI_BLK_COUNT(x) (((x) & 0xFFFF) << 16)
#define CQHCI_BLK_ADDR(x) (((x) & 0xFFFFFFFF) << 32)
/* direct command task descriptor fields */
#define CQHCI_CMD_INDEX(x) ((x & 0x3F) << 16)
#define CQHCI_CMD_TIMING(x) ((x & 1) << 22)
#define CQHCI_RESP_TYPE(x) ((x & 0x3) << 23)
#define CQHCI_CMD_INDEX(x) (((x) & 0x3F) << 16)
#define CQHCI_CMD_TIMING(x) (((x) & 1) << 22)
#define CQHCI_RESP_TYPE(x) (((x) & 0x3) << 23)
/* transfer descriptor fields */
#define CQHCI_DAT_LENGTH(x) ((x & 0xFFFF) << 16)
#define CQHCI_DAT_ADDR_LO(x) ((x & 0xFFFFFFFF) << 32)
#define CQHCI_DAT_ADDR_HI(x) ((x & 0xFFFFFFFF) << 0)
#define CQHCI_DAT_LENGTH(x) (((x) & 0xFFFF) << 16)
#define CQHCI_DAT_ADDR_LO(x) (((x) & 0xFFFFFFFF) << 32)
#define CQHCI_DAT_ADDR_HI(x) (((x) & 0xFFFFFFFF) << 0)
struct cqhci_host_ops;
struct mmc_host;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment