sparclinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: Rob Herring <robh@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH v2 3/4] PCI: of: Simplify devm_of_pci_get_host_bridge_resources() interface
Date: Wed, 15 Jan 2025 15:28:21 -0600	[thread overview]
Message-ID: <20250115212821.GA555572@bhelgaas> (raw)
In-Reply-To: <2ebc17a9-9065-4488-be3b-7534ab442c22@linux.intel.com>

On Tue, Jan 14, 2025 at 04:21:15PM -0800, Sathyanarayanan Kuppuswamy wrote:
> On 1/13/25 3:15 PM, Bjorn Helgaas wrote:
> > From: Bjorn Helgaas <bhelgaas@google.com>
> > 
> > Previously pci_parse_request_of_pci_ranges() supplied the default bus range
> > to devm_of_pci_get_host_bridge_resources(), but that function is static and
> > has no other callers, so there's no reason to complicate its interface by
> > passing the default bus range.
> > 
> > Drop the busno and bus_max parameters and use 0x0 and 0xff directly in
> > devm_of_pci_get_host_bridge_resources().

> >   	} else {
> > -		if (bus_range->end > bus_range->start + bus_max)
> > -			bus_range->end = bus_range->start + bus_max;
> > +		if (bus_range->end > 0xff) {
> > +			dev_info(dev, "  Invalid end bus number in %pR, defaulting to 0xff\n",
> > +				 bus_range);
> 
> Use dev_warn() ? I noticed that dev_info() is used in place of
> warning/errors in this file.

Good point, changed.

> Probably it needs to be cleaned?
> 
> > +			bus_range->end = 0xff;

  reply	other threads:[~2025-01-15 21:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13 23:15 [PATCH v2 0/4] PCI: Simplify bus range parsing Bjorn Helgaas
2025-01-13 23:15 ` [PATCH v2 1/4] PCI: Unexport of_pci_parse_bus_range() Bjorn Helgaas
2025-01-15  0:31   ` Sathyanarayanan Kuppuswamy
2025-01-13 23:15 ` [PATCH v2 2/4] PCI: of: Drop 'No bus range found' message Bjorn Helgaas
2025-01-15  0:31   ` Sathyanarayanan Kuppuswamy
2025-01-13 23:15 ` [PATCH v2 3/4] PCI: of: Simplify devm_of_pci_get_host_bridge_resources() interface Bjorn Helgaas
2025-01-15  0:21   ` Sathyanarayanan Kuppuswamy
2025-01-15 21:28     ` Bjorn Helgaas [this message]
2025-01-13 23:15 ` [PATCH v2 4/4] sparc/PCI: Update reference to devm_of_pci_get_host_bridge_resources() Bjorn Helgaas
2025-01-15  0:34   ` Sathyanarayanan Kuppuswamy
2025-01-15 21:29 ` [PATCH v2 0/4] PCI: Simplify bus range parsing Bjorn Helgaas

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=20250115212821.GA555572@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=andreas@gaisler.com \
    --cc=bhelgaas@google.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=sparclinux@vger.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).