[PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_setup()
Bjorn Helgaas
helgaas at kernel.org
Wed Sep 4 10:00:42 PDT 2024
On Wed, Sep 04, 2024 at 09:49:54PM +0530, Riyan Dhiman wrote:
> 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 at gmail.com>
Apparently a fix for 46c981fd60de ("PCI: brcmstb: Refactor for chips
with many regular inbound windows"), which is currently queued on the
pci/controller/brcmstb branch?
I agree, this looks good, and we should squash it into 46c981fd60de.
> ---
> 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
>
More information about the linux-arm-kernel
mailing list