Re: [PATCH net-next 04/12] can: convert to DEFINE_SIMPLE_DEV_PM_OPS()

From
Marc Kleine-Budde <mkl@pengutronix.de>
Date
2026-11-19 11:19:41
Also in
linux-can
Reply to
netdev-bot+sashiko@kernel.org, 2026-11-19
On 19.11.2026 09:54:28, netdev-bot+sashiko@kernel.org wrote:
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] For the ctucanfd glue drivers, the commit message's claim that
  the conversion "reduces kernel size in case CONFIG_PM or…

--

can: convert to DEFINE_SIMPLE_DEV_PM_OPS()

This converts seven CAN drivers from SIMPLE_DEV_PM_OPS() to
DEFINE_SIMPLE_DEV_PM_OPS() and wraps the .pm pointers in pm_sleep_ptr().
It also drops the __maybe_unused annotations from the suspend and resume
callbacks.

Link: https://patch.msgid.link/20260822074701.22856-1-triet.hoang.dev@gmail.com (local)
quoted
diff --git a/drivers/net/can/ctucanfd/ctucanfd.h b/drivers/net/can/ctucanfd/ctucanfd.h
index 0e9904f6a05d6..7dcd7dc507e49 100644
--- a/drivers/net/can/ctucanfd/ctucanfd.h
+++ b/drivers/net/can/ctucanfd/ctucanfd.h
@@ -76,7 +76,7 @@ int ctucan_probe_common(struct device *dev, void __iomem *addr,
 			void (*set_drvdata_fnc)(struct device *dev,
 						struct net_device *ndev));

-int ctucan_suspend(struct device *dev) __maybe_unused;
-int ctucan_resume(struct device *dev) __maybe_unused;
+int ctucan_suspend(struct device *dev);
+int ctucan_resume(struct device *dev);
[Severity: Low]
This isn't a bug, but does the size reduction in the commit message hold
for the ctucanfd drivers?

  "also reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is
  disabled."
looks valid.

pw-bot: cr

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Attachments

Thread (22 messages) 22 messages, 4 authors, last reply 5d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help