[PATCH v4 12/12] PCI: Remove '*val = 0' from pcie_capability_read_*()

2020-07-31 Thread Saheed O. Bolarinwa
move the reset of *val to 0 when pci_read_config_*() fails. Suggested-by: Bjorn Helgaas Signed-off-by: Saheed O. Bolarinwa --- drivers/pci/access.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/pci/access.c b/drivers/pci/access.c index 79c4a2ef269a..ec95edbb1ac8 1006

[PATCH v4 10/12] PCI/AER: Check if pcie_capability_read_*() reads ~0

2020-07-31 Thread Saheed O. Bolarinwa
on to confirm failure. Suggested-by: Bjorn Helgaas Signed-off-by: Saheed O. Bolarinwa --- drivers/pci/pcie/aer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 3acf56683915..dbeabc370efc 100644 --- a/drivers/pci/pci

[PATCH v4 00/12] PCI: Remove '*val = 0' from pcie_capability_read_*()

2020-07-31 Thread Saheed O. Bolarinwa
emove the reset of *val to 0 when pci_read_config_*() fails. [1] https://lore.kernel.org/linux-pci/20200714234625.GA428442@bjorn-Precision-5520/ Saheed O. Bolarinwa (12): IB/hfi1: Check if pcie_capability_read_*() reads ~0 misc: rtsx: Check if pcie_capability_read_*() reads ~0 ath9k: Check

[PATCH 12/14 v3] PCI/AER: Check the return value of pcie_capability_read_*()

2020-07-13 Thread Saheed O. Bolarinwa
From: Bolarinwa Olayemi Saheed On failure pcie_capability_read_dword() sets it's last parameter, val to 0. However, with Patch 14/14, it is possible that val is set to ~0 on failure. This would introduce a bug because (x & x) == (~0 & x). This bug can be avoided if the return value of pcie_capab

[RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-13 Thread Saheed O. Bolarinwa
. Redefine pcibios_err_to_errno() inside arch/x86/pci/pcbios.c 11. Replace pcibios_err_to_errno_v2() calls with pcibios_err_to_errno() 12. Remove pcibios_err_to_errno_v2() Suggested-by: Bjorn Helgaas Suggested-by: Yicong Yang Signed-off-by: "Saheed O. Bolarinwa" Bolarinwa Olay

[RFC PATCH 27/35] powerpc: Tidy Success/Failure checks

2020-07-13 Thread Saheed O. Bolarinwa
Remove unnecessary check for 0. Signed-off-by: "Saheed O. Bolarinwa" --- This patch depends on PATCH 26/35 arch/powerpc/platforms/powernv/eeh-powernv.c | 4 ++-- arch/powerpc/platforms/pseries/eeh_pseries.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ar

[RFC PATCH 26/35] powerpc: Change PCIBIOS_SUCCESSFUL to 0

2020-07-13 Thread Saheed O. Bolarinwa
In reference to the PCI spec (Chapter 2), PCIBIOS* is an x86 concept. Their scope should be limited within arch/x86. Change all PCIBIOS_SUCCESSFUL to 0 Signed-off-by: "Saheed O. Bolarinwa" --- arch/powerpc/kernel/rtas_pci.c | 4 ++-- arch/powerpc/platforms

[RFC PATCH 13/35] cxl: Change PCIBIOS_SUCCESSFUL to 0

2020-07-13 Thread Saheed O. Bolarinwa
In reference to the PCI spec (Chapter 2), PCIBIOS* is an x86 concept. There scope should be limited within arch/x86. Change all PCIBIOS_SUCCESSFUL to 0 Signed-off-by: "Saheed O. Bolarinwa" --- drivers/misc/cxl/vphb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di