You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/05/07 21:06:25 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a diff in pull request #6217: riscv/pmp: fix bug: PMP_CFG_FLAG_MASK makes pmp cfg fail.

gustavonihei commented on code in PR #6217:
URL: https://github.com/apache/incubator-nuttx/pull/6217#discussion_r867395025


##########
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)

Review Comment:
   Unfortunately we can't add these because this file applies for both RV32 and RV64.
   One portable way to suffix constants is via the `INTxx_C` macros, but there isn't one for PTR type.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org