xiaoxiang781216 commented on code in PR #11374:
URL: https://github.com/apache/nuttx/pull/11374#discussion_r1424301435


##########
arch/risc-v/src/common/riscv_pmp.c:
##########
@@ -89,6 +88,32 @@ typedef struct pmp_entry_s pmp_entry_t;
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: log2ceil
+ *
+ * Description:
+ *   Calculate the up-rounded power-of-two for input.
+ *
+ * Input Parameters:
+ *   x - Argument to calculate the power-of-two from.
+ *
+ * Returned Value:
+ *   Power-of-two for argument, rounded up.
+ *
+ ****************************************************************************/
+
+static uintptr_t log2ceil(uintptr_t x)

Review Comment:
   should we extract to a common function



-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to