All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kw@linux.com>
To: florian.fainelli@broadcom.com
Cc: Riyan Dhiman <riyandhiman14@gmail.com>,
	jim2101024@gmail.com, nsaenz@kernel.org,
	lorian.fainelli@broadcom.com,
	bcm-kernel-feedback-list@broadcom.com, bhelgaas@google.com,
	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: Thu, 5 Sep 2024 03:10:55 +0900	[thread overview]
Message-ID: <20240904181055.GA20073@rocinante> (raw)
In-Reply-To: <159c5fcf-709d-42ba-8d45-a70b109fe261@broadcom.com>

Hello,

> > 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.
[...]
> 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!

The former would be my preference.

As such, I can make the change on the branch directly, if needed.  To avoid
reposting or sending a new patch.

	Krzysztof

  reply	other threads:[~2024-09-04 18:10 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
2024-09-04 18:10   ` Krzysztof Wilczyński [this message]
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=20240904181055.GA20073@rocinante \
    --to=kw@linux.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=florian.fainelli@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.