Re: [RFC PATCH net-next 6/7] net: mdio: add Airoha EN8811H MDIO device driver
From: sashiko-bot@kernel.org
Date: 2026-09-07 17:46:06
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Incorrect PM wrapper used for dev_pm_ops structure pointer. -- commit 23bfd1bd681c899f8cb9185a35af023d5e062675 Author: Aleksei Sviridkin [off-list ref] net: mdio: add Airoha EN8811H MDIO device driver This commit introduces the EN8811H MDIO device driver. The driver polls for and downloads firmware to the MD32 microcontroller before it functions as an Ethernet PHY.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/mdio/mdio-airoha-en8811h.c b/drivers/net/mdio/mdio-airoha-en8811h.c new file mode 100644 index 0000000000000..d94d74d85f10d --- /dev/null +++ b/drivers/net/mdio/mdio-airoha-en8811h.c
[ ... ]
+static DEFINE_SIMPLE_DEV_PM_OPS(en8811h_mcu_pm_ops, NULL, en8811h_mcu_resume);
+
+static const struct of_device_id en8811h_mcu_of_match[] = {
+ { .compatible = "airoha,en8811h-mcu" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, en8811h_mcu_of_match);
+
+static struct mdio_driver en8811h_mcu_driver = {
+ .probe = en8811h_mcu_probe,
+ .remove = en8811h_mcu_remove,
+ .mdiodrv.driver = {
+ .name = "airoha-en8811h-mcu",
+ .of_match_table = en8811h_mcu_of_match,
+ .pm = pm_sleep_ptr(&en8811h_mcu_pm_ops),[Severity: Low] Should this use pm_ptr() instead of pm_sleep_ptr() for the dev_pm_ops structure pointer? The power management subsystem guidelines indicate that pm_sleep_ptr() is reserved for individual sleep callbacks inside the dev_pm_ops structure itself, while pm_ptr() must be used when assigning the structure pointer to the driver declaration in en8811h_mcu_driver.
+ }, +}; + +mdio_module_driver(en8811h_mcu_driver);
-- Sashiko AI review · https://sashiko.dev/#/patchset/cover.1788711797.git.f@lex.la?part=6