drivers: i3c: cdns: fix bitwise operation in CONF_STATUS0_DEV_ROLE macro
Updated the CONF_STATUS0_DEV_ROLE macro to ensure proper bitwise operation by adding parentheses around the bitmask operation. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
312bea8cae
commit
34c4f9e6b1
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@
|
|||
#define CONF_STATUS0_SUPPORTS_DDR BIT(5)
|
||||
#define CONF_STATUS0_SEC_MASTER BIT(4)
|
||||
/* And it was replaced with a Dev Role mask */
|
||||
#define CONF_STATUS0_DEV_ROLE(x) ((x) & GENMASK(5, 4) >> 4)
|
||||
#define CONF_STATUS0_DEV_ROLE(x) (((x) & GENMASK(5, 4)) >> 4)
|
||||
#define CONF_STATUS0_DEV_ROLE_MAIN_MASTER 0
|
||||
#define CONF_STATUS0_DEV_ROLE_SEC_MASTER 1
|
||||
#define CONF_STATUS0_DEV_ROLE_SLAVE 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue