Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: devres: fix error about PCI devres

The documentation states that pcim_enable_device() will make "all PCI
ops" managed. This is totally false, only a small subset of PCI
functions become managed that way. Implicating otherwise has caused at
least one bug so far, namely in commit 8558de401b5f ("drm/vboxvideo: use
managed pci functions").

Change the function summary so the functions dangerous behavior becomes
obvious.

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240809095248.14220-2-pstanner@redhat.com

authored by

Philipp Stanner and committed by
Jonathan Corbet
8839adc3 1f5e3920

+1 -1
+1 -1
Documentation/driver-api/driver-model/devres.rst
··· 391 391 devm_pci_remap_cfgspace() : ioremap PCI configuration space 392 392 devm_pci_remap_cfg_resource() : ioremap PCI configuration space resource 393 393 394 - pcim_enable_device() : after success, all PCI ops become managed 394 + pcim_enable_device() : after success, some PCI ops become managed 395 395 pcim_iomap() : do iomap() on a single BAR 396 396 pcim_iomap_regions() : do request_region() and iomap() on multiple BARs 397 397 pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs