This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 539f9a862e arm/cache: fix build warning on LLVM clang
539f9a862e is described below

commit 539f9a862edf2766b74bf7b71654691a4646984a
Author: chao an <anc...@xiaomi.com>
AuthorDate: Mon Oct 24 17:56:34 2022 +0800

    arm/cache: fix build warning on LLVM clang
    
    armv7-m/arm_cache.c:93:24: warning: unused function 'arm_clz' 
[-Wunused-function]
    static inline uint32_t arm_clz(unsigned int value)
                           ^
    
    Signed-off-by: chao an <anc...@xiaomi.com>
---
 arch/arm/src/armv7-m/arm_cache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/src/armv7-m/arm_cache.c b/arch/arm/src/armv7-m/arm_cache.c
index 6d74b8d71d..6dd5d0aed1 100644
--- a/arch/arm/src/armv7-m/arm_cache.c
+++ b/arch/arm/src/armv7-m/arm_cache.c
@@ -90,6 +90,7 @@
  *
  ****************************************************************************/
 
+#ifdef CONFIG_ARMV7M_DCACHE
 static inline uint32_t arm_clz(unsigned int value)
 {
   uint32_t ret;
@@ -97,6 +98,7 @@ static inline uint32_t arm_clz(unsigned int value)
   __asm__ __volatile__ ("clz %0, %1" : "=r"(ret) : "r"(value));
   return ret;
 }
+#endif
 
 /****************************************************************************
  * Public Functions

Reply via email to