xiaoxiang781216 commented on code in PR #10724:
URL: https://github.com/apache/nuttx/pull/10724#discussion_r1331949482
##########
arch/risc-v/src/common/riscv_pmp.c:
##########
@@ -100,32 +101,6 @@ typedef struct pmp_entry_s pmp_entry_t;
* Private Functions
****************************************************************************/
-/****************************************************************************
- * Name: log2ceil
- *
- * Description:
- * Calculate the up-rounded power-of-two for input.
- *
- * Input Parameters:
- * size - The size of the PMP region.
- *
- * Returned Value:
- * Power-of-two for argument, rounded up.
- *
- ****************************************************************************/
-
-static uintptr_t log2ceil(uintptr_t size)
-{
- uintptr_t pot = 0;
-
- for (size = size - 1; size > 1; size >>= 1)
- {
- pot++;
- }
-
- return pot;
-}
-
Review Comment:
@acassis is this enough?
https://github.com/apache/nuttx/blob/master/include/nuttx/lib/math32.h#L41-L60
Anyway, let's merge this patch and create a new pr later if need.
--
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]