diff --git a/arch/risc-v/src/common/riscv_pmp.c b/arch/risc-v/src/common/riscv_pmp.c index e9786aa9c44..0e32f1be534 100644 --- a/arch/risc-v/src/common/riscv_pmp.c +++ b/arch/risc-v/src/common/riscv_pmp.c @@ -58,7 +58,7 @@ #define BLOCK_ALIGN_MASK (MIN_BLOCK_SIZE - 1) #define PMP_CFG_BITS_CNT (8) -#define PMP_CFG_FLAG_MASK (0xFF) +#define PMP_CFG_FLAG_MASK ((uintptr_t)0xFF) #define PMP_CFG_CNT_IN_REG (PMP_XLEN / PMP_CFG_BITS_CNT)