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:
Xiang Xiao 2023-01-16 23:54:17 +08:00 committed by Alan Carvalho de Assis
parent 2ec117b3ca
commit 62c5afe655
1 changed files with 1 additions and 1 deletions

View File

@ -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);