Skip to contentSkip to conversation

Documentation/pci.txt inconsistency

DISCUSSION Applied Rolf Eike Beer 2 participants 4 messages Nov 17, 2004 – Nov 19, 2004 Documentation

lore
Share & tools
lore
#0 lore raw

The examples in section 2 of Documentation/pci.txt use pci_get_*. Some lines later there is this funny little paragraph:

Quoted 5 lines

Note that these functions are not hotplug-safe. Their hotplug-safe replacements are pci_get_device(), pci_get_class() and pci_get_subsys(). They increment the reference count on the pci_dev that they return. You must eventually (possibly at module unload) decrement the reference count on these devices by calling pci_dev_put().

How about this:

These functions are hotplug-safe. They increment the reference count on the pci_dev that they return. You must eventually (possibly at module unload) decrement the reference count on these devices by calling pci_dev_put().

Eike

#1 lore raw
Quoted 9 lines · Rolf Eike Beer

The examples in section 2 of Documentation/pci.txt use pci_get_*. Some lines later there is this funny little paragraph:

Quoted 5 lines

Note that these functions are not hotplug-safe. Their hotplug-safe replacements are pci_get_device(), pci_get_class() and pci_get_subsys(). They increment the reference count on the pci_dev that they return. You must eventually (possibly at module unload) decrement the reference count on these devices by calling pci_dev_put().

Quoted 5 lines

How about this:

These functions are hotplug-safe. They increment the reference count on the pci_dev that they return. You must eventually (possibly at module unload) decrement the reference count on these devices by calling pci_dev_put().

Great, care to send a patch instead?

thanks,

greg k-h

#2 lore raw
Quoted 12 lines · Greg KH
Quoted 11 lines · Rolf Eike Beer

The examples in section 2 of Documentation/pci.txt use pci_get_*. Some lines

later there is this funny little paragraph:

Quoted 6 lines

Note that these functions are not hotplug-safe. Their hotplug-safe replacements are pci_get_device(), pci_get_class() and pci_get_subsys(). They increment the reference count on the pci_dev that they return. You must eventually (possibly at module unload) decrement the reference count on these devices by calling pci_dev_put().

Quoted 8 lines
Quoted 6 lines

How about this:

These functions are hotplug-safe. They increment the reference count on the pci_dev that they return. You must eventually (possibly at module unload) decrement the reference count on these devices by calling pci_dev_put().

Great, care to send a patch instead?

Documentation/pci.txt +3 -5
@@ -156,11 +156,9 @@
 VENDOR_ID or DEVICE_ID.  This allows searching for any device from a
 specific vendor, for example.
 
-Note that these functions are not hotplug-safe.  Their hotplug-safe
-replacements are pci_get_device(), pci_get_class() and pci_get_subsys().
-They increment the reference count on the pci_dev that they return.
-You must eventually (possibly at module unload) decrement the reference
-count on these devices by calling pci_dev_put().
+   These functions are hotplug-safe. They increment the reference count on
+the pci_dev that they return. You must eventually (possibly at module unload)
+decrement the reference count on these devices by calling pci_dev_put().
 
 
 3. Enabling and disabling devices
Applied
#3 lore raw
Quoted 15 lines · Rolf Eike Beer
Quoted 14 lines · Greg KH
Quoted 13 lines · Rolf Eike Beer

The examples in section 2 of Documentation/pci.txt use pci_get_*. Some lines

later there is this funny little paragraph:

Quoted 6 lines

Note that these functions are not hotplug-safe. Their hotplug-safe replacements are pci_get_device(), pci_get_class() and pci_get_subsys(). They increment the reference count on the pci_dev that they return. You must eventually (possibly at module unload) decrement the reference count on these devices by calling pci_dev_put().

How about this:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

These functions are hotplug-safe. They increment the reference count on the pci_dev that they return. You must eventually (possibly at module unload) decrement the reference count on these devices by calling pci_dev_put().

Great, care to send a patch instead?

Applied, thanks.

greg k-h