mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: "Manivannan Sadhasivam" <mani@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>
Cc: Rob Herring <robh@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	linux-pci@vger.kernel.org,  llvm@lists.linux.dev,
	linux-kernel@vger.kernel.org,  Ian Rogers <irogers@google.com>
Subject: [PATCH 0/2] PCI: endpoint: Set .owner = THIS_MODULE in struct pci_epc_ops
Date: Thu,  3 Dec 2026 09:16:39 -0800	[thread overview]
Message-ID: <20261203171642.440891-1-irogers@google.com> (raw)

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


             reply	other threads:[~2026-12-03 17:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 17:16 Ian Rogers [this message]
2026-12-03 17:16 ` [PATCH 1/2] PCI: cadence: Set .owner = THIS_MODULE in cdns_pcie_epc_ops Ian Rogers
2026-12-03 17:16 ` [PATCH 2/2] PCI: endpoint: Set .owner = THIS_MODULE in remaining pci_epc_ops Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261203171642.440891-1-irogers@google.com \
    --to=irogers@google.com \
    --cc=bhelgaas@google.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=nathan@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®