summaryrefslogtreecommitdiff
path: root/arch/s390/pci/pci_bus.c
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2023-04-04 19:29:28 +0300
committerVasily Gorbik <gor@linux.ibm.com>2023-04-04 19:29:28 +0300
commitf62f8b716da158f94bf191ea89b34d01bf94b261 (patch)
tree9fdfbdb5096b3b576ae56c9977cd66af9d345300 /arch/s390/pci/pci_bus.c
parent85206bf95313c33a244d6ea4304b01ade95b8b05 (diff)
parent49d6e68f66132ee521d587ce97645ed2d3183d90 (diff)
downloadlinux-f62f8b716da158f94bf191ea89b34d01bf94b261.tar.xz
Merge branch 'uaccess-inline-asm-cleanup' into features
Heiko Carstens says: =================== There are a couple of oddities within the s390 uaccess library functions. Therefore cleanup the whole uaccess.c file. There is no functional change, only improved readability. The output of "objdump -Dr" was always compared before/after each patch to make sure that the generated object file is identical, if that could be expected. Therefore the series also includes more patches than really required to cleanup the code. Furthermore the kunit usercopy tests also still pass. =================== Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci_bus.c')
-rw-r--r--arch/s390/pci/pci_bus.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/s390/pci/pci_bus.c b/arch/s390/pci/pci_bus.c
index a9875feca293..32245b970a0c 100644
--- a/arch/s390/pci/pci_bus.c
+++ b/arch/s390/pci/pci_bus.c
@@ -41,9 +41,7 @@ static int zpci_nb_devices;
*/
static int zpci_bus_prepare_device(struct zpci_dev *zdev)
{
- struct resource_entry *window, *n;
- struct resource *res;
- int rc;
+ int rc, i;
if (!zdev_enabled(zdev)) {
rc = zpci_enable_device(zdev);
@@ -57,10 +55,10 @@ static int zpci_bus_prepare_device(struct zpci_dev *zdev)
}
if (!zdev->has_resources) {
- zpci_setup_bus_resources(zdev, &zdev->zbus->resources);
- resource_list_for_each_entry_safe(window, n, &zdev->zbus->resources) {
- res = window->res;
- pci_bus_add_resource(zdev->zbus->bus, res, 0);
+ zpci_setup_bus_resources(zdev);
+ for (i = 0; i < PCI_STD_NUM_BARS; i++) {
+ if (zdev->bars[i].res)
+ pci_bus_add_resource(zdev->zbus->bus, zdev->bars[i].res, 0);
}
}