diff options
| author | Nick Alcock <[email protected]> | 2023-02-16 15:24:04 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2023-02-17 14:47:58 +0000 |
| commit | f98954b293d0a0f9646117af75c82c1b89191c53 (patch) | |
| tree | f85cb016a73518dcf8ab28ea81edf64ad7f202c0 /drivers/pci/controller/pci-versatile.c | |
| parent | Linux 6.2-rc1 (diff) | |
| download | kernel-f98954b293d0a0f9646117af75c82c1b89191c53.tar.gz kernel-f98954b293d0a0f9646117af75c82c1b89191c53.zip | |
PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules
Since 8b41fc4454e3 ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are
used to identify modules. As a consequence, MODULE_LICENSE in non-modules
causes modprobe to misidentify the object file as a module when it is not,
and modprobe might succeed rather than failing with a suitable error
message.
For tristate modules that can be either built-in or loaded at runtime,
modprobe succeeds in both cases:
# modprobe ext4
[exit status zero if CONFIG_EXT4_FS=y or =m]
For boolean modules like the Standard Hot Plug Controller driver (shpchp)
that cannot be loaded at runtime, modprobe should always fail like this:
# modprobe shpchp
modprobe: FATAL: Module shpchp not found in directory /lib/modules/...
[exit status non-zero regardless of CONFIG_HOTPLUG_PCI_SHPC]
but prior to this commit, shpchp_core.c contained MODULE_LICENSE, so
"modprobe shpchp" silently succeeded when it should have failed.
Remove MODULE_LICENSE in files that cannot be built as modules.
[bhelgaas: commit log, squash]
Suggested-by: Luis Chamberlain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]/
Signed-off-by: Nick Alcock <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Cc: Hitomi Hasegawa <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pci-versatile.c')
| -rw-r--r-- | drivers/pci/controller/pci-versatile.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pci/controller/pci-versatile.c b/drivers/pci/controller/pci-versatile.c index 7991d334e0f1..e9a6758fe2c1 100644 --- a/drivers/pci/controller/pci-versatile.c +++ b/drivers/pci/controller/pci-versatile.c @@ -169,4 +169,3 @@ static struct platform_driver versatile_pci_driver = { module_platform_driver(versatile_pci_driver); MODULE_DESCRIPTION("Versatile PCI driver"); -MODULE_LICENSE("GPL v2"); |
