@@ -108,7 +108,7 @@ static int scsi_hot_add(Monitor *mon, DeviceState *adapter,
int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
DriveInfo *dinfo, int type)
{
- int dom, pci_bus;
+ unsigned int dom, pci_bus;
unsigned slot;
PCIDevice *dev;
const char *pci_addr = qdict_get_str(qdict, "pci_addr");
@@ -257,7 +257,7 @@ void pci_device_hot_add(Monitor *mon, const QDict *qdict)
static int pci_device_hot_remove(Monitor *mon, const char *pci_addr)
{
PCIDevice *d;
- int dom, bus;
+ unsigned int dom, bus;
unsigned slot;
Error *local_err = NULL;
@@ -512,8 +512,9 @@ static void pci_set_default_subsystem_id(PCIDevice *pci_dev)
* Parse [[<domain>:]<bus>:]<slot>, return -1 on error if funcp == NULL
* [[<domain>:]<bus>:]<slot>.<func>, return -1 on error
*/
-static int pci_parse_devaddr(const char *addr, int *domp, int *busp,
- unsigned int *slotp, unsigned int *funcp)
+static int pci_parse_devaddr(const char *addr, unsigned int *domp,
+ unsigned int *busp, unsigned int *slotp,
+ unsigned int *funcp)
{
const char *p;
char *e;
@@ -571,8 +572,8 @@ static int pci_parse_devaddr(const char *addr, int *domp, int *busp,
return 0;
}
-int pci_read_devaddr(Monitor *mon, const char *addr, int *domp, int *busp,
- unsigned *slotp)
+int pci_read_devaddr(Monitor *mon, const char *addr, unsigned int *domp,
+ unsigned int *busp, unsigned *slotp)
{
/* strip legacy tag */
if (!strncmp(addr, "pci_addr=", 9)) {
@@ -587,7 +588,7 @@ int pci_read_devaddr(Monitor *mon, const char *addr, int *domp, int *busp,
PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr)
{
- int dom, bus;
+ unsigned int dom, bus;
unsigned slot;
if (!devaddr) {
@@ -340,8 +340,8 @@ PCIDevice *pci_find_device(PCIBus *bus, int bus_num, uint8_t devfn);
int pci_qdev_find_device(const char *id, PCIDevice **pdev);
PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr);
-int pci_read_devaddr(Monitor *mon, const char *addr, int *domp, int *busp,
- unsigned *slotp);
+int pci_read_devaddr(Monitor *mon, const char *addr, unsigned int *domp,
+ unsigned int *busp, unsigned *slotp);
void pci_device_deassert_intx(PCIDevice *dev);
It's the more appropriate type as there are no negative domain or bus values. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- hw/pci-hotplug.c | 4 ++-- hw/pci.c | 11 ++++++----- hw/pci.h | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-)