Skip to contentSkip to conversation

Documentation: devres: fix error about PCI devres

PATCH RESEND Applied Philipp Stanner 3 participants 3 messages Aug 9, 2024 – Aug 16, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 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.

---
+CC PCI and Bjorn.

Bjorn, btw. neither PCI nor you are printed by getmaintainers for the touched document. Possibly one might want to think about fixing that somehow.
But I don't think it's a huge deal.

---
 Documentation/driver-api/driver-model/devres.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/driver-api/driver-model/devres.rst +1 -1
index ac9ee7441887..5f2ee8d717b1 100644
@@ -391,7 +391,7 @@ PCI
   devm_pci_remap_cfgspace()	: ioremap PCI configuration space
   devm_pci_remap_cfg_resource()	: ioremap PCI configuration space resource
 
-  pcim_enable_device()		: after success, all PCI ops become managed
+  pcim_enable_device()		: after success, some PCI ops become managed
   pcim_iomap()			: do iomap() on a single BAR
   pcim_iomap_regions()		: do request_region() and iomap() on multiple BARs
   pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs
Signature · 1 line
2.45.2
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Philipp Stanner

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.

s/Implicating/Suggesting/
s/functions dangerous/function's dangerous/

Quoted 27 lines

---
+CC PCI and Bjorn.

Bjorn, btw. neither PCI nor you are printed by getmaintainers for the touched document. Possibly one might want to think about fixing that somehow.
But I don't think it's a huge deal.

---
 Documentation/driver-api/driver-model/devres.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/driver-api/driver-model/devres.rst +1 -1
index ac9ee7441887..5f2ee8d717b1 100644
@@ -391,7 +391,7 @@ PCI
   devm_pci_remap_cfgspace()	: ioremap PCI configuration space
   devm_pci_remap_cfg_resource()	: ioremap PCI configuration space resource
 
-  pcim_enable_device()		: after success, all PCI ops become managed
+  pcim_enable_device()		: after success, some PCI ops become managed
   pcim_iomap()			: do iomap() on a single BAR
   pcim_iomap_regions()		: do request_region() and iomap() on multiple BARs
   pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs
Signature · 1 line
2.45.2
maintainer Applied
#2 lore raw
In reply to Philipp Stanner
Quoted 13 lines · Philipp Stanner

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.

---
+CC PCI and Bjorn.

Quoted 7 lines

Bjorn, btw. neither PCI nor you are printed by getmaintainers for the touched document. Possibly one might want to think about fixing that somehow.
But I don't think it's a huge deal.

---
 Documentation/driver-api/driver-model/devres.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

jon