[PATCH 2/2] PCI: pciehp: Fix wrong failure check on pcie_capability_read_*()

2020-06-19 Thread refactormyself
From: Bolarinwa Olayemi Saheed On failure, pcie_capabiility_read_*() will set the status value, its last parameter to 0 and not ~0. This bug fix checks for the proper value. Signed-off-by: Bolarinwa Olayemi Saheed --- drivers/pci/hotplug/pciehp_hpc.c | 10 +- 1 file changed, 5

[PATCH 0/2] Fix wrong failure check on pcie_capability_read_*()

2020-06-19 Thread refactormyself
From: Bolarinwa Olayemi Saheed On failure, pcie_capabiility_read_*() will set the status value, its last parameter to 0 and not ~0. This bug fix checks for the proper value. Bolarinwa Olayemi Saheed (2): PCI/PME: Fix wrong failure check on pcie_capability_read_*() PCI: pciehp: Fix wrong

[PATCH 1/2] PCI/PME: Fix wrong failure check on pcie_capability_read_*()

2020-06-19 Thread refactormyself
From: Bolarinwa Olayemi Saheed On failure, pcie_capabiility_read_*() will set rtsta to 0 and not ~0. This bug fix checks for the proper value. Signed-off-by: Bolarinwa Olayemi Saheed --- drivers/pci/pcie/pme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 4/8] PCI: Convert PCIBIOS_* errors to generic -E* errors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed Both pcie_set_readrq() and pcie_set_readrq() return PCIBIOS_ error codes which were passed down the call heirarchy from PCIe capability accessors. PCIBIOS_ error codes have positive values. Passing on these values is inconsistent with functions which return only a

[PATCH v2 2/8] IB/hfi1: Convert PCIBIOS_* errors to generic -E* errors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed pcie_speeds() returns PCIBIOS_ error codes from PCIe capability accessors. PCIBIOS_ error codes have positive values. Passing on these values is inconsistent with functions which return only a negative value on failure. Before passing on the return value of PCIe

[PATCH 0/8 v2] PCI: Align return values of PCIe capability and PCI accessors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed PATCH 1/8 to 7/8: PCIBIOS_ error codes have positive values and they are passed down the call heirarchy from accessors. For functions which are meant to return only a negative value on failure, passing on this value is a bug. To mitigate this, call

[PATCH v2 6/8] PCI/AER: Convert PCIBIOS_* errors to generic -E* errors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed pci_enable_pcie_error_reporting() return PCIBIOS_ error codes which were passed on down the call heirarchy from PCIe capability accessors. PCIBIOS_ error codes have positive values. Passing on these values is inconsistent with functions which return only a

[PATCH v2 7/8] PCI/AER: Convert PCIBIOS_* errors to generic -E* errors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed pci_disable_pcie_error_reporting() returns PCIBIOS_ error code which were passed down the call heirarchy from PCIe capability accessors. PCIBIOS_ error codes have positive values. Passing on these values is inconsistent with functions which return only a negative

[PATCH v2 3/8] IB/hfi1: Convert PCIBIOS_* errors to generic -E* errors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed restore_pci_variables() and save_pci_variables() return PCIBIOS_ error codes from PCIe capability accessors. PCIBIOS_ error codes have positive values. Passing on these values is inconsistent with functions which return only a negative value on failure. Before

[PATCH v2 1/8] dmaengine: ioatdma: Convert PCIBIOS_* errors to generic -E* errors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed ioat3_dma_probe() returns PCIBIOS_ error codes from PCIe capability accessors. PCIBIOS_ error codes have positive values. Passing on these values is inconsistent with functions which return only a negative value on failure. Before passing on the return value of

[PATCH v2 5/8] scsi: smartpqi: Convert PCIBIOS_* errors to generic -E* errors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed pqi_set_pcie_completion_timeout() return PCIBIOS_ error codes which were passed on down the call heirarchy from PCIe capability accessors. PCIBIOS_ error codes have positive values. Passing on these values is inconsistent with functions which return only a

[PATCH v2 8/8] PCI: Align return values of PCIe capability and PCI accessors

2020-06-15 Thread refactormyself
From: Bolarinwa Olayemi Saheed The PCIe capability accessors can return 0, -EINVAL, or any PCIBIOS_ error code. PCIBIOS_ error codes have positive values. The PCI accessor on the other hand can only return 0 or any PCIBIOS_ error code. This inconsistency among these accessor makes it harder for