From: sashiko-bot@kernel.org
To: "Sasha Levin" <sashal@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 6.18-5.10] PCI: cadence: Add missing MODULE_DEVICE_TABLE()
Date: Mon, 19 Oct 2026 14:19:19 +0000 [thread overview]
Message-ID: <sashiko-outbox-177346@kernel.org> (raw)
In-Reply-To: <20261019135441.1420968-74-sashal@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] PCI: cadence: MODULE_DEVICE_TABLE() added to non-modular built-in driver
--
commit 47a5cb89a268b5f62186006942f7b1da4567a7f3
Author: Pengpeng Hou <pengpeng@iscas.ac.cn>
PCI: cadence: Add missing MODULE_DEVICE_TABLE()
This commit adds MODULE_DEVICE_TABLE(of, cdns_plat_pcie_of_match) to
pcie-cadence-plat.c so that module alias information is generated for
OF-based module autoloading.
Link: https://patch.msgid.link/20260704122835.14277-1-pengpeng@iscas.ac.cn
> diff --git a/drivers/pci/controller/cadence/pcie-cadence-plat.c b/drivers/pci/controller/cadence/pcie-cadence-plat.c
> index 0456845dabb96..0f9cf2a9f0034 100644
> --- a/drivers/pci/controller/cadence/pcie-cadence-plat.c
> +++ b/drivers/pci/controller/cadence/pcie-cadence-plat.c
> @@ -167,6 +167,7 @@ static const struct of_device_id cdns_plat_pcie_of_match[] = {
> },
> {},
> };
> +MODULE_DEVICE_TABLE(of, cdns_plat_pcie_of_match);
>
> static struct platform_driver cdns_plat_pcie_driver = {
> .driver = {
[Severity: Medium]
Can this driver actually be built as a loadable module in this tree?
Upstream commit 611627a4e5e4a ("PCI: cadence: Add module support for
platform controller driver", merged in v6.19) converted the Kconfig symbols
from bool to tristate and switched the driver to module_platform_driver(),
but that prerequisite commit is not present in this v6.18 baseline.
In this tree, drivers/pci/controller/cadence/Kconfig defines the symbols as
bool:
config PCIE_CADENCE_PLAT
bool
config PCIE_CADENCE_PLAT_HOST
bool "Cadence platform PCIe controller (host mode)"
config PCIE_CADENCE_PLAT_EP
bool "Cadence platform PCIe controller (endpoint mode)"
And drivers/pci/controller/cadence/pcie-cadence-plat.c registers
cdns_plat_pcie_driver as a built-in driver without including
linux/module.h, defining a .remove callback, or setting MODULE_LICENSE():
static struct platform_driver cdns_plat_pcie_driver = {
.driver = {
.name = "cdns-pcie",
.of_match_table = cdns_plat_pcie_of_match,
.pm = &cdns_pcie_pm_ops,
},
.probe = cdns_plat_pcie_probe,
.shutdown = cdns_plat_pcie_shutdown,
};
builtin_platform_driver(cdns_plat_pcie_driver);
Since pcie-cadence-plat can only be compiled built-in (never with -DMODULE),
MODULE_DEVICE_TABLE(of, cdns_plat_pcie_of_match) preprocesses to nothing
under !MODULE and relies on transitive inclusion of linux/module.h. Should
this backport be dropped from this branch, or is commit 611627a4e5e4a also
intended to be backported?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261019135441.1420968-74-sashal@kernel.org?part=1
next prev parent reply other threads:[~2026-10-19 14:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261019135441.1420968-1-sashal@kernel.org>
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.1] PCI: switchtec: Add Microchip PCI1008 to NTB DMA alias quirk Sasha Levin
2026-10-19 14:06 ` sashiko-bot
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-5.10] PCI: cadence: Add missing MODULE_DEVICE_TABLE() Sasha Levin
2026-10-19 14:19 ` sashiko-bot [this message]
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.1] PCI: switchtec: Add Microchip PCI1008 device ID Sasha Levin
2026-10-19 14:14 ` sashiko-bot
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18] PCI: vmd: Add Nova Lake (NVL) and Dunlow (DNL) Device IDs Sasha Levin
2026-10-19 14:20 ` sashiko-bot
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-6.1] PCI: Avoid saving config space state if inaccessible Sasha Levin
2026-10-19 14:41 ` sashiko-bot
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] PCI/portdrv: Allow probing even without child services Sasha Levin
2026-10-19 14:40 ` sashiko-bot
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-5.10] PCI: vmd: Handle BUS_RESTRICT_CFG value 3 for Arrow Lake-HX Sasha Levin
2026-10-19 14:50 ` sashiko-bot
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-5.10] PCI/ATS: Ensure pci_ats_supported() is PF-aware for VFs Sasha Levin
2026-10-19 15:18 ` 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=sashiko-outbox-177346@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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