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>,
Jingoo Han <jingoohan1@gmail.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Shawn Lin <shawn.lin@rock-chips.com>,
Heiko Stuebner <heiko@sntech.de>,
linux-renesas-soc@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] PCI: endpoint: Set .owner = THIS_MODULE in remaining pci_epc_ops
Date: Thu, 3 Dec 2026 09:16:41 -0800 [thread overview]
Message-ID: <20261203171642.440891-3-irogers@google.com> (raw)
In-Reply-To: <20261203171642.440891-1-irogers@google.com>
pcie-designware-ep, pcie-rcar-ep, and pcie-rockchip-ep are currently
bool Kconfig options (where THIS_MODULE is NULL), so omitting .owner in
their struct pci_epc_ops definitions does not affect runtime module
reference counting today.
Initialize .owner = THIS_MODULE in all three for consistency across all
struct pci_epc_ops definitions and to prepare for annotating
pci_epc_ops::owner with Clang's require_explicit_initialization
attribute.
Signed-off-by: Ian Rogers <irogers@google.com>
---
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 ++
3 files changed, 6 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index e6060bb0bbbd..d5223597b5c9 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -8,6 +8,7 @@
#include <linux/align.h>
#include <linux/bitfield.h>
+#include <linux/module.h>
#include <linux/of.h>
#include <linux/overflow.h>
#include <linux/platform_device.h>
@@ -949,6 +950,7 @@ static const struct pci_epc_ops epc_ops = {
.get_features = dw_pcie_ep_get_features,
.get_aux_resources_count = dw_pcie_ep_get_aux_resources_count,
.get_aux_resources = dw_pcie_ep_get_aux_resources,
+ .owner = THIS_MODULE,
};
/**
diff --git a/drivers/pci/controller/pcie-rcar-ep.c b/drivers/pci/controller/pcie-rcar-ep.c
index e33c66caa1a6..b9df4699178c 100644
--- a/drivers/pci/controller/pcie-rcar-ep.c
+++ b/drivers/pci/controller/pcie-rcar-ep.c
@@ -7,6 +7,7 @@
*/
#include <linux/delay.h>
+#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/pci.h>
@@ -463,6 +464,7 @@ static const struct pci_epc_ops rcar_pcie_epc_ops = {
.start = rcar_pcie_ep_start,
.stop = rcar_pcie_ep_stop,
.get_features = rcar_pcie_ep_get_features,
+ .owner = THIS_MODULE,
};
static const struct of_device_id rcar_pcie_ep_of_match[] = {
diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c
index a20536d50c9c..4a6c9dfeab83 100644
--- a/drivers/pci/controller/pcie-rockchip-ep.c
+++ b/drivers/pci/controller/pcie-rockchip-ep.c
@@ -14,6 +14,7 @@
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/irq.h>
+#include <linux/module.h>
#include <linux/of.h>
#include <linux/pci-epc.h>
#include <linux/platform_device.h>
@@ -704,6 +705,7 @@ static const struct pci_epc_ops rockchip_pcie_epc_ops = {
.start = rockchip_pcie_ep_start,
.stop = rockchip_pcie_ep_stop,
.get_features = rockchip_pcie_ep_get_features,
+ .owner = THIS_MODULE,
};
static int rockchip_pcie_ep_get_resources(struct rockchip_pcie *rockchip,
--
2.56.1.839.g22a8290db9-goog
next prev parent reply other threads:[~2026-12-03 17:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Ian Rogers [this message]
2026-12-03 18:47 ` [PATCH 0/2] PCI: endpoint: Set .owner = THIS_MODULE in struct pci_epc_ops sashiko-bot
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-3-irogers@google.com \
--to=irogers@google.com \
--cc=bhelgaas@google.com \
--cc=geert+renesas@glider.be \
--cc=heiko@sntech.de \
--cc=jingoohan1@gmail.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=lpieralisi@kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=nathan@kernel.org \
--cc=robh@kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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