Re: [PATCH v1 2/2] usb: dwc3: Add Renesas R-Car Gen5 DWC3 xHCI USB controller glue

Geert Uytterhoeven <[email protected]> Wed, 5 Aug 2026 09:53:29 +0200
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb
Message-ID <CAMuHMdVQRJv8zoQYmgiObivaOoOBnE53mVdF3hPsJBK4bu4-Ew@mail.gmail.com>
Hi Thinh,

On Wed, 5 Aug 2026 at 02:48, Thinh Nguyen <[email protected]> wrote:
> On Tue, Jul 28, 2026, Marek Vasut wrote:
> > --- /dev/null
> > +++ b/drivers/usb/dwc3/dwc3-rcar-gen5.c

> > +static int __maybe_unused dwc3_rcar_gen5_suspend(struct device *dev)
>
> Avoid using __maybe_unused. If it's not used, remove it.

Whether the function is used or not depends on CONFIG_PM_SLEEP ;-)

> > +static DEFINE_RUNTIME_DEV_PM_OPS(dwc3_rcar_gen5_pm_ops,
> > +                              dwc3_rcar_gen5_suspend,
> > +                              dwc3_rcar_gen5_resume, NULL);

As DEFINE_RUNTIME_DEV_PM_OPS() uses pm_sleep_ptr()
internally, the __maybe_unused annotations above can be removed.

> > +
> > +static const struct of_device_id dwc3_rcar_gen5_of_match[] = {
> > +     { .compatible = "renesas,rcar-gen5-usb" },
> > +     { /* sentinel */ }
> > +};
> > +MODULE_DEVICE_TABLE(of, dwc3_rcar_gen5_of_match);
> > +
> > +static struct platform_driver dwc3_rcar_gen5_driver = {
> > +     .probe          = dwc3_rcar_gen5_probe,
> > +     .driver         = {
> > +             .name   = "renesas-rcar-gen5-usb",
> > +             .of_match_table = dwc3_rcar_gen5_of_match,
> > +             .pm     = &dwc3_rcar_gen5_pm_ops,

But as Sashiko pointed out, the pm_ptr() is missing here.

> > +     },
> > +};
> > +
> > +module_platform_driver(dwc3_rcar_gen5_driver);


Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds