linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Riyan Dhiman <riyandhiman14@gmail.com>
To: jim2101024@gmail.com, nsaenz@kernel.org,
	lorian.fainelli@broadcom.com,
	bcm-kernel-feedback-list@broadcom.com, bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Riyan Dhiman <riyandhiman14@gmail.com>
Subject: [PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_setup()
Date: Wed,  4 Sep 2024 21:49:54 +0530	[thread overview]
Message-ID: <20240904161953.46790-2-riyandhiman14@gmail.com> (raw)

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



             reply	other threads:[~2024-09-04 16:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 16:19 Riyan Dhiman [this message]
2024-09-04 16:55 ` [PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_setup() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240904161953.46790-2-riyandhiman14@gmail.com \
    --to=riyandhiman14@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=jim2101024@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lorian.fainelli@broadcom.com \
    --cc=nsaenz@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).