Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI: endpoint: Set .owner = THIS_MODULE in struct pci_epc_ops
@ 2026-12-03 17:16 Ian Rogers
  2026-12-03 17:16 ` [PATCH 1/2] PCI: cadence: Set .owner = THIS_MODULE in cdns_pcie_epc_ops Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ian Rogers @ 2026-12-03 17:16 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas
  Cc: Rob Herring, Nathan Chancellor, linux-pci, llvm, linux-kernel,
	Ian Rogers

pci_epc_get() / pci_epc_put() reference count epc->ops->owner, while
none of the four struct pci_epc_ops definitions under
drivers/pci/controller/ initialize .owner:

  1. pcie-cadence-ep (tristate CONFIG_PCIE_CADENCE_EP) - fixes missing
     module pinning when built as a module (has Fixes tag).
  2. pcie-designware-ep, pcie-rcar-ep, and pcie-rockchip-ep (currently
     bool) - initialized for consistency and to prepare for annotating
     pci_epc_ops::owner with __must_init.

Tooling note: Found using Clang's require_explicit_initialization
attribute; an AI coding assistant helped audit call sites, verify Kconfig
module eligibility and Fixes commits, and draft the changelogs. All four
files were build-tested with LLVM=1.

Ian Rogers (2):
  PCI: cadence: Set .owner = THIS_MODULE in cdns_pcie_epc_ops
  PCI: endpoint: Set .owner = THIS_MODULE in remaining pci_epc_ops

 drivers/pci/controller/cadence/pcie-cadence-ep.c | 1 +
 drivers/pci/controller/dwc/pcie-designware-ep.c  | 2 ++
 drivers/pci/controller/pcie-rcar-ep.c            | 2 ++
 drivers/pci/controller/pcie-rockchip-ep.c        | 2 ++
 4 files changed, 7 insertions(+)


base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
-- 
2.56.1.839.g22a8290db9-goog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-03 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 17:16 [PATCH 0/2] PCI: endpoint: Set .owner = THIS_MODULE in struct pci_epc_ops Ian Rogers
2026-12-03 17:16 ` [PATCH 1/2] PCI: cadence: Set .owner = THIS_MODULE in cdns_pcie_epc_ops Ian Rogers
2026-12-03 18:33   ` sashiko-bot
2026-12-03 17:16 ` [PATCH 2/2] PCI: endpoint: Set .owner = THIS_MODULE in remaining pci_epc_ops Ian Rogers
2026-12-03 18:47 ` [PATCH 0/2] PCI: endpoint: Set .owner = THIS_MODULE in struct pci_epc_ops sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox