]> git.baikalelectronics.ru Git - kernel.git/commit
s390/pci: simplify CLP List PCI handling
authorNiklas Schnelle <schnelle@linux.ibm.com>
Thu, 22 Jul 2021 09:44:08 +0000 (11:44 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 25 Aug 2021 09:03:33 +0000 (11:03 +0200)
commitc81f4ee1ff4a8a5bd60a5b704ddae1d56a9d3622
tree9a5b659a0fbef8b3615b0ec61fa0a4b9d3527e60
parent7e06dc1fd5e78f2b3afe5ce3ad86297c0456c59d
s390/pci: simplify CLP List PCI handling

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: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/pci/pci.c
arch/s390/pci/pci_clp.c