Skip to contentSkip to conversation

PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES

PATCH In review Yinghai Lu 2 participants 2 messages Jan 4, 2012 – Jan 6, 2012 PCI

lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES

Save some bytes for device resource array.

---
 include/linux/pci.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/pci.h +1 -1
Index: linux-2.6/include/linux/pci.h
===================================================================
@@ -111,7 +111,7 @@ enum {
 	PCI_NUM_RESOURCES,
 
 	/* preserve this for compatibility */
-	DEVICE_COUNT_RESOURCE
+	DEVICE_COUNT_RESOURCE = PCI_NUM_RESOURCES,
 };
 
 typedef int __bitwise pci_power_t;
#1 lore raw
Quoted 13 lines · On Wed, 4 Jan 2012 15:49:45 -0800 Yinghai Lu <[email protected]> wrote:

Save some bytes for device resource array.

---
 include/linux/pci.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/include/linux/pci.h
===================================================================

include/linux/pci.h enum { · line 117

Quoted 8 lines
include/linux/pci.h +1 -1
@@ -111,7 +111,7 @@ enum {
 	PCI_NUM_RESOURCES,
 
 	/* preserve this for compatibility */
-	DEVICE_COUNT_RESOURCE
+	DEVICE_COUNT_RESOURCE = PCI_NUM_RESOURCES,
 };
 
 typedef int __bitwise pci_power_t;

Not sure what this buys us by itself, but it's applied in preparation for any upcoming cleanups.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center