提交 5e434f4e 编写于 作者: I Isaku Yamahata 提交者: Michael S. Tsirkin

pci: clean up of pci_set_default_subsystem_id().

Use pci accessor function.
don't return value because it always return 0 and
the caller doesn't check the return value.
Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 aa6f63ff
......@@ -419,14 +419,12 @@ int pci_device_load(PCIDevice *s, QEMUFile *f)
return ret;
}
static int pci_set_default_subsystem_id(PCIDevice *pci_dev)
static void pci_set_default_subsystem_id(PCIDevice *pci_dev)
{
uint16_t *id;
id = (void*)(&pci_dev->config[PCI_SUBSYSTEM_VENDOR_ID]);
id[0] = cpu_to_le16(pci_default_sub_vendor_id);
id[1] = cpu_to_le16(pci_default_sub_device_id);
return 0;
pci_set_word(pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID,
pci_default_sub_vendor_id);
pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID,
pci_default_sub_device_id);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册