From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Murali Karicheri <m-karicheri2@ti.com>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM/PCI: set MPS before pci_bus_add_devices()
Date: Mon, 3 Aug 2015 20:13:40 +0100 [thread overview]
Message-ID: <20150803191340.GM7557@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1437514519-18545-1-git-send-email-m-karicheri2@ti.com>
On Tue, Jul 21, 2015 at 05:35:19PM -0400, Murali Karicheri wrote:
> The MPS configuration should be done *before* pci_bus_add_devices().
> After pci_bus_add_devices(), drivers may be bound to devices, and
> the PCI core shouldn't touch device configuration while a driver
> owns the device.
>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> Reported-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> arch/arm/kernel/bios32.c | 19 +++++--------------
> 1 file changed, 5 insertions(+), 14 deletions(-)
>
> diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
> index fcbbbb1..17efde7 100644
> --- a/arch/arm/kernel/bios32.c
> +++ b/arch/arm/kernel/bios32.c
> @@ -520,7 +520,8 @@ void pci_common_init_dev(struct device *parent, struct hw_pci *hw)
> list_for_each_entry(sys, &head, node) {
> struct pci_bus *bus = sys->bus;
>
> - if (!pci_has_flag(PCI_PROBE_ONLY)) {
> + if (bus && !pci_has_flag(PCI_PROBE_ONLY)) {
Let's get rid of that useless check. bus can't be NULL here.
In the original code (below) if bus was NULL, then we would've already
oopsed before we got here. As we don't oops here, no one is ever
seeing it being NULL, so the test is redundant.
> - list_for_each_entry(sys, &head, node) {
> - struct pci_bus *bus = sys->bus;
> -
> - /* Configure PCI Express settings */
> - if (bus && !pci_has_flag(PCI_PROBE_ONLY)) {
Thanks.
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2015-08-03 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 21:35 [PATCH] ARM/PCI: set MPS before pci_bus_add_devices() Murali Karicheri
2015-07-23 14:24 ` Murali Karicheri
2015-07-23 14:59 ` Bjorn Helgaas
2015-08-03 18:18 ` Murali Karicheri
2015-08-03 19:13 ` Russell King - ARM Linux [this message]
2015-08-03 22:34 ` 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=20150803191340.GM7557@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=bhelgaas@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=m-karicheri2@ti.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;
as well as URLs for NNTP newsgroup(s).