mirror of https://gitee.com/openkylin/libvirt.git
nodedev: Indent PCI express for future fix
Best viewed with '-w' as this is just an adjustment for future patch to be readable without that. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
5bcd96f531
commit
0d8f45246a
|
@ -505,28 +505,30 @@ static int udevProcessPCI(struct udev_device *device,
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* We need to be root to read PCI device configs */
|
/* We need to be root to read PCI device configs */
|
||||||
if (priv->privileged && virPCIDeviceIsPCIExpress(pciDev) > 0) {
|
if (priv->privileged) {
|
||||||
if (VIR_ALLOC(pci_express) < 0)
|
if (virPCIDeviceIsPCIExpress(pciDev) > 0) {
|
||||||
goto out;
|
if (VIR_ALLOC(pci_express) < 0)
|
||||||
|
|
||||||
if (virPCIDeviceHasPCIExpressLink(pciDev) > 0) {
|
|
||||||
if (VIR_ALLOC(pci_express->link_cap) < 0 ||
|
|
||||||
VIR_ALLOC(pci_express->link_sta) < 0)
|
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (virPCIDeviceGetLinkCapSta(pciDev,
|
if (virPCIDeviceHasPCIExpressLink(pciDev) > 0) {
|
||||||
&pci_express->link_cap->port,
|
if (VIR_ALLOC(pci_express->link_cap) < 0 ||
|
||||||
&pci_express->link_cap->speed,
|
VIR_ALLOC(pci_express->link_sta) < 0)
|
||||||
&pci_express->link_cap->width,
|
goto out;
|
||||||
&pci_express->link_sta->speed,
|
|
||||||
&pci_express->link_sta->width) < 0)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
pci_express->link_sta->port = -1; /* PCIe can't negotiate port. Yet :) */
|
if (virPCIDeviceGetLinkCapSta(pciDev,
|
||||||
|
&pci_express->link_cap->port,
|
||||||
|
&pci_express->link_cap->speed,
|
||||||
|
&pci_express->link_cap->width,
|
||||||
|
&pci_express->link_sta->speed,
|
||||||
|
&pci_express->link_sta->width) < 0)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
pci_express->link_sta->port = -1; /* PCIe can't negotiate port. Yet :) */
|
||||||
|
}
|
||||||
|
data->pci_dev.flags |= VIR_NODE_DEV_CAP_FLAG_PCIE;
|
||||||
|
data->pci_dev.pci_express = pci_express;
|
||||||
|
pci_express = NULL;
|
||||||
}
|
}
|
||||||
data->pci_dev.flags |= VIR_NODE_DEV_CAP_FLAG_PCIE;
|
|
||||||
data->pci_dev.pci_express = pci_express;
|
|
||||||
pci_express = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
Loading…
Reference in New Issue