linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_setup()
@ 2024-09-04 16:19 Riyan Dhiman
  2024-09-04 16:55 ` florian.fainelli
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Riyan Dhiman @ 2024-09-04 16:19 UTC (permalink / raw)
  To: jim2101024, nsaenz, lorian.fainelli, bcm-kernel-feedback-list,
	bhelgaas
  Cc: linux-pci, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Riyan Dhiman

Change num_inbound_wins from u8 to int in brcm_pcie_setup() function to correctly 
handle potential negative error codes returned by brcm_pcie_get_inbound_wins().
The u8 type was inappropriate for capturing the function's return value,
which can include error codes.

Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com>
---
 drivers/pci/controller/pcie-brcmstb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index e8332fe5396e..b2859c4fd931 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -1030,7 +1030,8 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
 	struct pci_host_bridge *bridge;
 	struct resource_entry *entry;
 	u32 tmp, burst, aspm_support;
-	u8 num_out_wins = 0, num_inbound_wins = 0;
+	u8 num_out_wins = 0
+	int num_inbound_wins = 0;
 	int memc, ret;
 
 	/* Reset the bridge */
-- 
2.46.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-07 18:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 16:19 [PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_setup() Riyan Dhiman
2024-09-04 16:55 ` florian.fainelli
2024-09-04 18:10   ` Krzysztof Wilczyński
2024-09-04 17:00 ` Bjorn Helgaas
2024-09-07 15:52 ` kernel test robot
2024-09-07 18:51 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).