s390/pci: remove clp_rescan_pci_devices()
authorNiklas Schnelle <schnelle@linux.ibm.com>
Fri, 21 Aug 2020 09:01:54 +0000 (11:01 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 14 Sep 2020 09:38:34 +0000 (11:38 +0200)
there is only one call site of clp_rescan_pci_devices() and
all the function does is call zpci_remove_reserved_devices()
followed by a duplicating clp_scan_pci_devices().
So inline the single call as a call to zpci_remove_reserved_devices()
and clp_scan_pci_devices() and remove the function.

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/pci/pci_clp.c
arch/s390/pci/pci_event.c

index 140cb6b..430f694 100644 (file)
@@ -210,7 +210,6 @@ void zpci_remove_reserved_devices(void);
 /* CLP */
 int clp_setup_writeback_mio(void);
 int clp_scan_pci_devices(void);
-int clp_rescan_pci_devices(void);
 int clp_rescan_pci_devices_simple(u32 *fid);
 int clp_add_pci_device(u32, u32, int);
 int clp_enable_fh(struct zpci_dev *, u8);
index 5180794..6aabfb1 100644 (file)
@@ -441,23 +441,6 @@ int clp_scan_pci_devices(void)
        return rc;
 }
 
-int clp_rescan_pci_devices(void)
-{
-       struct clp_req_rsp_list_pci *rrb;
-       int rc;
-
-       zpci_remove_reserved_devices();
-
-       rrb = clp_alloc_block(GFP_KERNEL);
-       if (!rrb)
-               return -ENOMEM;
-
-       rc = clp_list_pci(rrb, NULL, __clp_add);
-
-       clp_free_block(rrb);
-       return rc;
-}
-
 /* Rescan PCI functions and refresh function handles. If fid is non-NULL only
  * refresh the handle of the function matching @fid
  */
index 9a3a291..e67cc2f 100644 (file)
@@ -150,7 +150,8 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
                }
                break;
        case 0x0306: /* 0x308 or 0x302 for multiple devices */
-               clp_rescan_pci_devices();
+               zpci_remove_reserved_devices();
+               clp_scan_pci_devices();
                break;
        case 0x0308: /* Standby -> Reserved */
                if (!zdev)