lpc43xx/usb: Fix gcc13.2 compiler error
Error: arch/arm/src/common/arm_internal.h:140:25: error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 'volatile long unsigned int[]'} [-Werror=array-bounds=] 140 | #define getreg32(a) (*(volatile uint32_t *)(a)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~ chip/lpc43_usb0dev.c:347:34: note: in expansion of macro 'getreg32' 347 | # define lpc43_getreg(addr) getreg32(addr) | ^~~~~~~~ chip/lpc43_usb0dev.c:2605:15: note: in expansion of macro 'lpc43_getreg' 2605 | return (int)lpc43_getreg(LPC43_USBDEV_FRINDEX_OFFSET); | ^~~~~~~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
d267071398
commit
1e696425fd
2 changed files with 4 additions and 4 deletions
|
@ -1869,7 +1869,7 @@ static int lpc31_usbinterrupt(int irq, void *context, void *arg)
|
|||
{
|
||||
usbtrace(TRACE_INTDECODE(LPC31_TRACEINTID_FRAME), 0);
|
||||
|
||||
priv->sof = (int)lpc31_getreg(LPC31_USBDEV_FRINDEX_OFFSET);
|
||||
priv->sof = lpc31_getreg(LPC31_USBDEV_FRINDEX);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2557,7 +2557,7 @@ static int lpc31_getframe(struct usbdev_s *dev)
|
|||
|
||||
/* FIXME: this actually returns the micro frame number! */
|
||||
|
||||
return (int)lpc31_getreg(LPC31_USBDEV_FRINDEX_OFFSET);
|
||||
return (int)lpc31_getreg(LPC31_USBDEV_FRINDEX);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1893,7 +1893,7 @@ static int lpc43_usbinterrupt(int irq, void *context, void *arg)
|
|||
{
|
||||
usbtrace(TRACE_INTDECODE(LPC43_TRACEINTID_FRAME), 0);
|
||||
|
||||
priv->sof = (int)lpc43_getreg(LPC43_USBDEV_FRINDEX_OFFSET);
|
||||
priv->sof = lpc43_getreg(LPC43_USBDEV_FRINDEX);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2602,7 +2602,7 @@ static int lpc43_getframe(struct usbdev_s *dev)
|
|||
|
||||
/* FIXME: this actually returns the micro frame number! */
|
||||
|
||||
return (int)lpc43_getreg(LPC43_USBDEV_FRINDEX_OFFSET);
|
||||
return (int)lpc43_getreg(LPC43_USBDEV_FRINDEX);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue