• Niklas Schnelle's avatar
    s390/pci: simplify CLP List PCI handling · cc049eec
    Niklas Schnelle authored
    Currently clp_get_state() and clp_refresh_fh() awkwardly use the
    clp_list_pci() callback mechanism to find the entry for a specific FID
    and update its zdev, respectively return its state.
    
    This is both needlessly complex and means we are always going through
    the entire PCI function list even if the FID has already been found.
    Instead lets introduce a clp_find_pci() function to find a specific
    entry and share the CLP List PCI request handling code with
    clp_list_pci().
    
    With that in place we can also easily make the function handle a simple
    out parameter instead of directly altering the zdev allowing easier
    access to the updated function handle by the caller.
    Reviewed-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
    Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    cc049eec
pci_clp.c 15.1 KB