Commit c4c37723 authored by Denis Efremov's avatar Denis Efremov Committed by Vasily Gorbik

s390/pci: PCI_IOV_RESOURCES loop refactoring in zpci_map_resources

This patch alters the for loop iteration scheme in zpci_map_resources
to make it more usual. Thus, the patch generalizes the style for
PCI_IOV_RESOURCES iteration and improves readability.

Link: http://lkml.kernel.org/r/20190806160137.29275-1-efremov@linux.comSigned-off-by: default avatarDenis Efremov <efremov@linux.com>
Signed-off-by: default avatarSebastian Ott <sebott@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 59793c5a
......@@ -431,13 +431,13 @@ static void zpci_map_resources(struct pci_dev *pdev)
}
#ifdef CONFIG_PCI_IOV
i = PCI_IOV_RESOURCES;
for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
int bar = i + PCI_IOV_RESOURCES;
for (; i < PCI_SRIOV_NUM_BARS + PCI_IOV_RESOURCES; i++) {
len = pci_resource_len(pdev, i);
len = pci_resource_len(pdev, bar);
if (!len)
continue;
pdev->resource[i].parent = &iov_res;
pdev->resource[bar].parent = &iov_res;
}
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment