From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "Justin P. Mattock" <justinmattock@gmail.com>,
linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 4/5]pci:setup_bus.c Fix warning: variable 'retval' set but not used
Date: Fri, 18 Jun 2010 12:49:56 -0700 [thread overview]
Message-ID: <20100618124956.40c869a0@virtuousgeek.org> (raw)
In-Reply-To: <4C1BBF7D.8090904@kernel.org>
On Fri, 18 Jun 2010 11:48:29 -0700
Yinghai Lu <yinghai@kernel.org> wrote:
> On 06/18/2010 10:23 AM, Jesse Barnes wrote:
> > On Tue, 15 Jun 2010 22:33:53 -0700
> > "Justin P. Mattock" <justinmattock@gmail.com> wrote:
> >
> >> The below patch fixes a warning message when using gcc 4.6.0
> >> CC drivers/pci/setup-bus.o
> >> drivers/pci/setup-bus.c: In function 'pci_assign_unassigned_bridge_resources':
> >> drivers/pci/setup-bus.c:868:6: warning: variable 'retval' set but not used
> >>
> >> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
> >>
> >> ---
> >> drivers/pci/setup-bus.c | 2 --
> >> 1 files changed, 0 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> >> index 19b1113..215590b 100644
> >> --- a/drivers/pci/setup-bus.c
> >> +++ b/drivers/pci/setup-bus.c
> >> @@ -865,7 +865,6 @@ void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge)
> >> struct pci_bus *parent = bridge->subordinate;
> >> int tried_times = 0;
> >> struct resource_list_x head, *list;
> >> - int retval;
> >> unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM |
> >> IORESOURCE_PREFETCH;
> >>
> >> @@ -874,7 +873,6 @@ void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge)
> >> again:
> >> pci_bus_size_bridges(parent);
> >> __pci_bridge_assign_resources(bridge, &head);
> >> - retval = pci_reenable_device(bridge);
> >> pci_set_master(bridge);
> >> pci_enable_bridges(parent);
> >>
>
> I sent following patch several weeks ago, can you put that in pci-next?
>
> Subject: [PATCH] pciehp: Enable bridges at last for multiple try assigning
>
> Found one PCIe Module with several bridges "cold" hotadd doesn't work.
>
> the root cause:
> 1. BIOS assign small range the parent bridges.
> 2. First try for hotadd only can make some bridges get resource assigned.
> 3. Second will update parent bridge res, get right sizes for all child bridges
> and devices, but resource for child bridges are not set to HW register.
> Because first try already enable those bridges, so __pci_bridge_assign_resource
> skip the setting step.
>
> So try to move enabling of child bridges to last and only do that one time
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Yeah I had a hard time following the changelog, but just looked it
over. Looks safe, but Justin will still need to check the return value
on pci_reenable_device.
Justin, we don't want a message on every reenable, just on ones that
fail. So can you protect your printk with if (retval) instead? You'll
need to refresh it based on my linux-next branch in a few minutes, as
I'm pushing Yinghai's patch now.
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2010-06-18 19:51 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 5:33 [PATCH 0/5] Fix set but unused variable warnings Justin P. Mattock
2010-06-16 5:33 ` [PATCH 1/5]wireless:hostap_main.c warning: variable 'iface' set but not used Justin P. Mattock
2010-06-16 5:33 ` [PATCH 2/5]wireless:hostap_ap.c Fix warning: variable 'fc' " Justin P. Mattock
2010-06-16 5:33 ` [PATCH 3/5]pci:bus.c Fix variable 'retval' " Justin P. Mattock
2010-06-16 5:42 ` Julian Calaby
2010-06-16 6:56 ` Justin P. Mattock
2010-06-16 6:07 ` Junchang Wang
2010-06-16 6:58 ` Justin P. Mattock
2010-06-16 17:01 ` Justin P. Mattock
2010-06-17 17:15 ` Justin P. Mattock
2010-06-16 5:33 ` [PATCH 4/5]pci:setup_bus.c Fix warning: " Justin P. Mattock
2010-06-18 17:23 ` Jesse Barnes
2010-06-18 17:31 ` Justin P. Mattock
2010-06-18 18:38 ` Justin P. Mattock
2010-06-18 18:48 ` Yinghai Lu
2010-06-18 19:49 ` Jesse Barnes [this message]
2010-06-18 19:59 ` Justin P. Mattock
2010-06-18 20:05 ` Jesse Barnes
2010-06-18 20:26 ` Justin P. Mattock
2010-06-18 20:46 ` Jesse Barnes
2010-06-18 21:12 ` Justin P. Mattock
2010-06-16 5:33 ` [PATCH 5/5]scsi:hosts.c Fix warning: variable 'rval' " Justin P. Mattock
2010-06-16 15:34 ` James Bottomley
2010-06-16 16:00 ` Justin P. Mattock
2010-06-16 17:25 ` Rolf Eike Beer
2010-06-16 17:33 ` James Bottomley
2010-06-16 18:14 ` Justin P. Mattock
2010-06-17 16:16 ` Justin P. Mattock
2010-06-18 19:37 ` James Bottomley
2010-06-18 19:55 ` Justin P. Mattock
2010-06-18 20:17 ` Justin P. Mattock
2010-06-16 5:52 ` [PATCH 0/5] Fix set but unused variable warnings Julian Calaby
2010-06-16 7:01 ` Justin P. Mattock
2010-06-16 11:09 ` Matthew Wilcox
2010-06-16 11:30 ` Julian Calaby
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=20100618124956.40c869a0@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=justinmattock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=yinghai@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).