Skip to contentSkip to conversation

pci: add const to pci_is_express(), pci_config_size().

PATCH Applied Isaku Yamahata 2 participants 2 messages May 27, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: add const to pci_is_express(), pci_config_size().

add const to pci_is_express(), pci_config_size().

---
 hw/pci.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/pci.h +2 -2
index 6eee93a..b803593 100644
@@ -339,12 +339,12 @@ void pci_qdev_register_many(PCIDeviceInfo *info);
 PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name);
 PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
 
-static inline int pci_is_express(PCIDevice *d)
+static inline int pci_is_express(const PCIDevice *d)
 {
     return d->cap_present & QEMU_PCI_CAP_EXPRESS;
 }
 
-static inline uint32_t pci_config_size(PCIDevice *d)
+static inline uint32_t pci_config_size(const PCIDevice *d)
 {
     return pci_is_express(d) ? PCIE_CONFIG_SPACE_SIZE : PCI_CONFIG_SPACE_SIZE;
 }
Signature · 1 line
1.6.6.1
#1 lore raw
Quoted 3 lines · Isaku Yamahata

add const to pci_is_express(), pci_config_size().

Applied, thanks.

Quoted 26 lines
---
 hw/pci.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/pci.h +2 -2
index 6eee93a..b803593 100644
@@ -339,12 +339,12 @@ void pci_qdev_register_many(PCIDeviceInfo *info);
 PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name);
 PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
 
-static inline int pci_is_express(PCIDevice *d)
+static inline int pci_is_express(const PCIDevice *d)
 {
     return d->cap_present & QEMU_PCI_CAP_EXPRESS;
 }
 
-static inline uint32_t pci_config_size(PCIDevice *d)
+static inline uint32_t pci_config_size(const PCIDevice *d)
 {
     return pci_is_express(d) ? PCIE_CONFIG_SPACE_SIZE : PCI_CONFIG_SPACE_SIZE;
 }
Signature · 1 line
1.6.6.1