PCI: Encourage resource request API users to supply driver name
authorPhilipp Stanner <pstanner@redhat.com>
Tue, 3 Dec 2024 10:00:24 +0000 (11:00 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 5 Dec 2024 17:29:52 +0000 (11:29 -0600)
commit9dfc6850cfa48a30d6a3068dd92db5b47ea8074e
treeea8f192a968aae32c639b119b2206bfffa091180
parent40384c840ea1944d7c5a392e8975ed088ecf0b37
PCI: Encourage resource request API users to supply driver name

PCI region request functions have a @name parameter (sometimes called
"res_name"). It is used in a log message to inform drivers about request
collisions, e.g., when another driver has requested that region already.

This message is only useful when it contains the actual owner of the
region, i.e., which driver requested it. So far, a great many drivers
misuse the @name parameter and just pass pci_name(), which doesn't result
in useful debug information.

Rename "res_name" to "name".

Detail @name's purpose in the docstrings.

Link: https://lore.kernel.org/r/20241203100023.31152-2-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
[bhelgaas: tweak comment wording to include "driver"]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/devres.c
drivers/pci/pci.c