Re: [PATCH v14 29/38] usb: dwc3: rockchip: introduce glue driver
| Newsgroups | org.infradead.lists.linux-phy,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Unconditional assignment of conditionally compiled `.complete` and `.prepare` PM callbacks in `dwc3_rockchip_dev_pm_ops` causes a build failure when `CONFIG_PM_SLEEP` is disabled. -- --- Patch [29]: [PATCH v14 29/38] usb: dwc3: rockchip: introduce glue driver --- commit 09abcbc065934ad4bfba3499b24e1bd888881c9d Author: Sebastian Reichel <[email protected]> usb: dwc3: rockchip: introduce glue driver Introduce Rockchip specific glue code for the Synopsys DWC3 USB driver. For now this handles things identical to the default glue. > diff --git a/drivers/usb/dwc3/dwc3-rockchip.c b/drivers/usb/dwc3/dwc3-rockchip.c > new file mode 100644 > index 0000000000000..1df33625b69f8 > --- /dev/null > +++ b/drivers/usb/dwc3/dwc3-rockchip.c [ ... ] > +static void dwc3_rockchip_complete(struct device *dev) > +{ > + dwc3_pm_complete(dev_get_drvdata(dev)); > +} > + > +static int dwc3_rockchip_prepare(struct device *dev) > +{ > + return dwc3_pm_prepare(dev_get_drvdata(dev)); > +} > +#endif > + > +static const struct dev_pm_ops dwc3_rockchip_dev_pm_ops = { > + SET_SYSTEM_SLEEP_PM_OPS(dwc3_rockchip_suspend, dwc3_rockchip_resume) > + .complete = dwc3_rockchip_complete, > + .prepare = dwc3_rockchip_prepare, [Severity: Low] Will this cause a build failure when CONFIG_PM_SLEEP is disabled? The functions dwc3_rockchip_complete() and dwc3_rockchip_prepare() are defined inside an #ifdef CONFIG_PM_SLEEP block, but they are referenced unconditionally here in dwc3_rockchip_dev_pm_ops. This would leave them undeclared if sleep support is not configured. > + /* > + * Runtime suspend halts the controller on disconnection. It relies on > + * platforms with custom connection notification to start the controller > + * again. > + */ > + SET_RUNTIME_PM_OPS(dwc3_rockchip_runtime_suspend, dwc3_rockchip_runtime_resume, > + dwc3_rockchip_runtime_idle) > +}; -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=29 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy