raiden00pl commented on code in PR #8827:
URL: https://github.com/apache/nuttx/pull/8827#discussion_r1140962810


##########
arch/arm/src/nrf52/nrf52_nvmc.c:
##########
@@ -102,78 +102,6 @@ static inline void nrf_mem_barrier(void)
  * Public Functions
  ****************************************************************************/
 
-/****************************************************************************
- * Name: nrf_nvmc_enable_icache
- *
- * Description:
- *   Enable I-Cache for Flash
- *
- * Input Parameter:
- *   flag - Flag to enable or disable.
- *
- * Returned Values:
- *   None
- *
- ****************************************************************************/
-
-void nrf_nvmc_enable_icache(bool flag)
-{
-  uint32_t value;
-
-  /* Read the current icache configuration */
-
-  value = getreg32(NRF52_NVMC_ICACHECNF);
-
-  if (flag)
-    {
-      value |= NVMC_ICACHECNF_CACHEEN;
-    }
-  else
-    {
-      value &= ~NVMC_ICACHECNF_CACHEEN;
-    }
-
-  /* Setup the new icache configuration */
-
-  putreg32(value, NRF52_NVMC_ICACHECNF);
-}
-
-/****************************************************************************
- * Name: nrf_nvmc_enable_profile
- *
- * Description:
- *   Enable profiling I-Cache for flash
- *
- * Input Parameter:
- *   flag - Flag to enable or disable.
- *
- * Returned Values:
- *   None
- *
- ****************************************************************************/
-
-void nrf_nvmc_enable_profile(bool flag)
-{
-  uint32_t value;
-
-  /* Read the current icache configuration */
-
-  value = getreg32(NRF52_NVMC_ICACHECNF);
-
-  if (flag)
-    {
-      value |= NVMC_ICACHECNF_CACHEPROFEN;
-    }
-  else
-    {
-      value &= ~NVMC_ICACHECNF_CACHEPROFEN;
-    }
-
-  /* Setup the new icache configuration */
-
-  putreg32(value, NRF52_NVMC_ICACHECNF);
-}
-

Review Comment:
   Wrapping the entire file with '#ifdef' makes debugging complex preprocessor 
logic a nightmare (for example, missing '#endif'). Reporting an error without 
`#else` statement for the rest of the file is much better.



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