pkarashchenko commented on a change in pull request #5746:
URL: https://github.com/apache/incubator-nuttx/pull/5746#discussion_r826915450



##########
File path: arch/risc-v/src/common/riscv_pmp.c
##########
@@ -318,19 +318,17 @@ static uintptr_t pmp_read_addr(uintptr_t region)
  *
  * Input Parameters:
  *   val  - Value to decode.
- *   base - Base out.
  *   size - Size out.
  *
  * Returned Value:
- *   None
+ *   Base address
  *
  ****************************************************************************/
 
-static void pmp_napot_decode(uintptr_t val, uintptr_t * base,
-                             uintptr_t * size)
+static uintptr_t pmp_napot_decode(uintptr_t val, uintptr_t * size)
 {
-  uint64_t mask = (uint64_t)(-1) >> 1;
-  uint64_t pot  = __riscv_xlen + 2;
+  uintptr_t mask = (uintptr_t)(-1) >> 1;
+  uintptr_t pot  = __riscv_xlen + 2;

Review comment:
       Yes. I made a mistake. It should be `sizeof(uintptr_t) * CHAR_BIT` you 
are right




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to