mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 08:54:05 +08:00
Fix warning in file included from chip/sam_clockconfig.c:34:
chip/sam_clockconfig.c: In function 'sam_usbclockconfig':
Error: /github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:135:51: error: 'regval' is used uninitialized [-Werror=uninitialized]
135 | #define putreg32(v,a) (*(volatile uint32_t *)(a) = (v))
| ^
chip/sam_clockconfig.c:422:12: note: 'regval' was declared here
422 | uint32_t regval;
| ^~~~~~
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
2ec117b3ca
commit
62c5afe655
@@ -466,10 +466,10 @@ static inline void sam_usbclockconfig(void)
|
||||
regval |= SFR_UTMICKTRIM_FREQ_48MHZ;
|
||||
#else
|
||||
# error Board oscillator frequency not compatible with use of UPLL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
putreg32(regval, (SAM_SFR_VBASE + SAM_SFR_UTMICKTRIM_OFFSET));
|
||||
#endif
|
||||
|
||||
regval = PMC_CKGR_UCKR_UPLLCOUNT(BOARD_CKGR_UCKR_UPLLCOUNT);
|
||||
putreg32(regval, SAM_PMC_CKGR_UCKR);
|
||||
|
||||
Reference in New Issue
Block a user