Skip to content

phy: Set missing .owner = THIS_MODULE in phy_ops

Ian Rogers linux-arm-kernel linux-arm-msm linux-mips linux-phy linux-samsung-soc linux-sunxi linux-tegra linux-usb lkml llvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10phy: allwinner: phy-sun6i-mipi-dphy: Set .owner = THIS_MODULEdrivers/phy/allwinner/phy-sun6i-mipi-dphy.c+1 -00 replies
2/10phy: cadence: cdns-dphy-rx: Set .owner = THIS_MODULEdrivers/phy/cadence/cdns-dphy-rx.c+1 -00 replies
3/10phy: cadence: cdns-dphy: Set .owner = THIS_MODULEdrivers/phy/cadence/cdns-dphy.c+1 -00 replies
4/10phy: eyeq5-eth: Set .owner = THIS_MODULEdrivers/phy/phy-eyeq5-eth.c+1 -00 replies
5/10phy: google: usb: Set .owner = THIS_MODULEdrivers/phy/phy-google-usb.c+2 -00 replies
6/10phy: qcom: ipq4019-usb: Set .owner = THIS_MODULEdrivers/phy/qualcomm/phy-qcom-ipq4019-usb.c+2 -00 replies
7/10phy: renesas: r8a779f0-ether-serdes: Set .owner = THIS_MODULEdrivers/phy/renesas/r8a779f0-ether-serdes.c+1 -00 replies
8/10phy: starfive: jh7110-dphy-rx: Set .owner = THIS_MODULEdrivers/phy/starfive/phy-jh7110-dphy-rx.c+1 -01 reply
9/10phy: sunplus: usb2: Set .owner = THIS_MODULEdrivers/phy/sunplus/phy-sunplus-usb2.c+1 -00 replies
10/10phy: tegra: mphy: Set .owner = THIS_MODULEdrivers/phy/tegra/phy-tegra-mphy.c+2 -00 replies

Reviews trailers per patch

1 of 10 patches has a Reviewed-by or Acked-by.

PatchChanghuang Liang
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10R-b
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] phy: Set missing .owner = THIS_MODULE in phy_ops

phy_get() and of_phy_get() call try_module_get(phy->ops->owner) to pin the PHY provider module while a PHY is in use, and of_phy_put() calls module_put(phy->ops->owner). Ten modular drivers under drivers/phy/ omit .owner = THIS_MODULE in their const struct phy_ops definitions, leaving phy->ops->owner NULL.

Split per driver to simplify per-vendor review and stable backporting.

Tooling note: Found using Clang's require_explicit_initialization attribute; an AI coding assistant helped audit call sites, verify Fixes commits, and draft the changelogs. All ten drivers were build-tested as modules (-DMODULE) with LLVM=1.

Ian Rogers (10):
phy: allwinner: phy-sun6i-mipi-dphy: Set .owner = THIS_MODULE
phy: cadence: cdns-dphy-rx: Set .owner = THIS_MODULE
phy: cadence: cdns-dphy: Set .owner = THIS_MODULE
phy: eyeq5-eth: Set .owner = THIS_MODULE
phy: google: usb: Set .owner = THIS_MODULE
phy: qcom: ipq4019-usb: Set .owner = THIS_MODULE
phy: renesas: r8a779f0-ether-serdes: Set .owner = THIS_MODULE
phy: starfive: jh7110-dphy-rx: Set .owner = THIS_MODULE
phy: sunplus: usb2: Set .owner = THIS_MODULE
phy: tegra: mphy: Set .owner = THIS_MODULE

 drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 1 +
 drivers/phy/cadence/cdns-dphy-rx.c          | 1 +
 drivers/phy/cadence/cdns-dphy.c             | 1 +
 drivers/phy/phy-eyeq5-eth.c                 | 1 +
 drivers/phy/phy-google-usb.c                | 2 ++
 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 2 ++
 drivers/phy/renesas/r8a779f0-ether-serdes.c | 1 +
 drivers/phy/starfive/phy-jh7110-dphy-rx.c   | 1 +
 drivers/phy/sunplus/phy-sunplus-usb2.c      | 1 +
 drivers/phy/tegra/phy-tegra-mphy.c          | 2 ++
 10 files changed, 13 insertions(+)

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244

Signature · 1 line
2.56.1.839.g22a8290db9-goog