mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 00:07:57 -06:00
pci: add const to pci_is_express(), pci_config_size().
add const to pci_is_express(), pci_config_size(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
5e434f4e60
commit
3c18685f43
1 changed files with 2 additions and 2 deletions
4
hw/pci.h
4
hw/pci.h
|
@ -350,12 +350,12 @@ void pci_qdev_register_many(PCIDeviceInfo *info);
|
||||||
PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name);
|
PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name);
|
||||||
PCIDevice *pci_create_simple(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;
|
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;
|
return pci_is_express(d) ? PCIE_CONFIG_SPACE_SIZE : PCI_CONFIG_SPACE_SIZE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue