From: florian.fainelli@broadcom.com
To: Riyan Dhiman <riyandhiman14@gmail.com>,
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
Subject: Re: [PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins in brcm_pcie_setup()
Date: Wed, 4 Sep 2024 09:55:48 -0700 [thread overview]
Message-ID: <159c5fcf-709d-42ba-8d45-a70b109fe261@broadcom.com> (raw)
In-Reply-To: <20240904161953.46790-2-riyandhiman14@gmail.com>
On 9/4/24 09:19, 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@gmail.com>
This looks fine, however it seems like we could either:
- update brcm_pcie_get_inbound_wins() to take a reference to an u8 and
assign num_inbound_wins directly plus return a negative error code
or
- update brcm_pcie_get_inbound_wins() to return 0 when encountering an error
We should have at least 1 inbound window to operate this PCIe
controller, so if we get 0, nothing useful is going to happen.
Deferring to Jim as to whether he prefers to take your patch or fix it
in a different way. Thanks!
--
Florian
next prev parent reply other threads:[~2024-09-04 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=159c5fcf-709d-42ba-8d45-a70b109fe261@broadcom.com \
--to=florian.fainelli@broadcom.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 \
--cc=riyandhiman14@gmail.com \
/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