Re: [PATCH v3] usb: dwc3: fix dwc3_readl() and dwc3_writel() calls in dwc3_ulpi_setup()

From: Sergey Shtylyov

Date: Fri Jul 03 2026 - 15:15:28 EST


On 7/3/26 7:20 PM, Ben Dooks wrote:

> The dwc3_ulpi_setup() calls the register read and write calls with

Hmm... maybe "does the register read/write calls"?

> dwc3->regs when both these calls take the dwc3 structure directly.
>
> Chnage these two calls to fix the following sparse warning, and

Change.

> possibly a nasty bug in the dwc3_ulpi_setup() code:
>
> drivers/usb/dwc3/core.c:796:45: warning: incorrect type in argument 1 (different address spaces)
> drivers/usb/dwc3/core.c:796:45: expected struct dwc3 *dwc
> drivers/usb/dwc3/core.c:796:45: got void [noderef] __iomem *regs
> drivers/usb/dwc3/core.c:798:40: warning: incorrect type in argument 1 (different address spaces)
> drivers/usb/dwc3/core.c:798:40: expected struct dwc3 *dwc
> drivers/usb/dwc3/core.c:798:40: got void [noderef] __iomem *regs
>
> Cc: stable@xxxxxxxxxx
> Fixes: 9accc68b1cf0 ("usb: dwc3: Add dwc pointer to dwc3_readl/writel")
> Acked-by: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>
> Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
> ---
> v2:
> add fixes and cc to stable
> v3:
> fixed the fixes: tag to point to correct commit

[...]

MBR, Sergey