From 539f9a862edf2766b74bf7b71654691a4646984a Mon Sep 17 00:00:00 2001 From: chao an Date: Mon, 24 Oct 2022 17:56:34 +0800 Subject: [PATCH] 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 --- 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