Thread (71 messages) 71 messages, 6 authors, 28d ago

Re: [PATCH v14 29/38] usb: dwc3: rockchip: introduce glue driver

From: sashiko-bot@kernel.org
Date: 2026-08-14 05:22:08
Also in: linux-phy

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 [off-list ref]

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.
quoted hunk ↗ jump to hunk
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/20260813-rockchip-usbdp-cleanup-v14-0-b5ad9c68fa11@collabora.com?part=29
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help