kernel_optimize_test/arch/s390/pci
Niklas Schnelle 0404bf4a66 s390/pci: fix misleading rc in clp_set_pci_fn()
[ Upstream commit f7addcdd527a6dddfebe20c358b87bdb95624612 ]

Currently clp_set_pci_fn() always returns 0 as long as the CLP request
itself succeeds even if the operation itself returns a response code
other than CLP_RC_OK or CLP_RC_SETPCIFN_ALRDY. This is highly misleading
because calling code assumes that a zero rc means that the operation was
successful.

Fix this by returning the response code or cc on failure with the
exception of the special handling for CLP_RC_SETPCIFN_ALRDY. Also let's
not assume that the returned function handle for CLP_RC_SETPCIFN_ALRDY
is 0, we don't need it anyway.

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:50:27 +02:00
..
Makefile
pci_bus.c
pci_bus.h
pci_clp.c
pci_debug.c
pci_dma.c
pci_event.c
pci_insn.c
pci_iov.c
pci_iov.h
pci_irq.c
pci_mmio.c
pci_sysfs.c
pci.c