From: Bjorn Helgaas <helgaas@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: linux-next: build warning after merge of the pci tree
Date: Thu, 23 Jun 2016 11:48:49 -0500 [thread overview]
Message-ID: <20160623164848.GE17987@localhost> (raw)
In-Reply-To: <20160623115154.62730f7f@canb.auug.org.au>
On Thu, Jun 23, 2016 at 11:51:54AM +1000, Stephen Rothwell wrote:
> Hi Bjorn,
>
> After merging the pci tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> drivers/misc/genwqe/card_base.c: In function 'genwqe_pci_remove':
> drivers/misc/genwqe/card_base.c:1155:6: warning: unused variable 'bars' [-Wunused-variable]
> int bars;
> ^
> drivers/misc/genwqe/card_base.c: In function 'genwqe_pci_setup':
> drivers/misc/genwqe/card_base.c:1143:2: warning: 'bars' may be used uninitialized in this function [-Wmaybe-uninitialized]
> pci_release_selected_regions(pci_dev, bars);
> ^
>
> Introduced by commit
>
> 370b01694826 ("GenWQE: Use pci_(request|release)_mem_regions")
Thanks, Stephen. I made the following edits, which should resolve these
warnings. Johannes, let me know if they look right to you.
diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c
index cb398be..a70b853 100644
--- a/drivers/misc/genwqe/card_base.c
+++ b/drivers/misc/genwqe/card_base.c
@@ -1067,7 +1067,7 @@ static int genwqe_health_check_stop(struct genwqe_dev *cd)
*/
static int genwqe_pci_setup(struct genwqe_dev *cd)
{
- int err, bars;
+ int err;
struct pci_dev *pci_dev = cd->pci_dev;
err = pci_enable_device_mem(pci_dev);
@@ -1140,7 +1140,7 @@ static int genwqe_pci_setup(struct genwqe_dev *cd)
out_iounmap:
pci_iounmap(pci_dev, cd->mmio);
out_release_resources:
- pci_release_selected_regions(pci_dev, bars);
+ pci_release_mem_regions(pci_dev);
err_disable_device:
pci_disable_device(pci_dev);
err_out:
@@ -1152,7 +1152,6 @@ static int genwqe_pci_setup(struct genwqe_dev *cd)
*/
static void genwqe_pci_remove(struct genwqe_dev *cd)
{
- int bars;
struct pci_dev *pci_dev = cd->pci_dev;
if (cd->mmio)
next prev parent reply other threads:[~2016-06-23 16:48 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 1:51 linux-next: build warning after merge of the pci tree Stephen Rothwell
2016-06-23 16:48 ` Bjorn Helgaas [this message]
2016-06-24 8:07 ` Johannes Thumshirn
-- strict thread matches above, loose matches on Subject: below --
2025-07-18 12:41 Stephen Rothwell
2025-05-21 10:26 Stephen Rothwell
2025-05-21 12:10 ` Krzysztof Wilczyński
2025-03-03 7:26 Stephen Rothwell
2025-03-03 7:50 ` Krzysztof Wilczyński
2025-03-03 9:46 ` Krzysztof Wilczyński
2024-07-01 9:24 Stephen Rothwell
2024-07-01 19:37 ` Bjorn Helgaas
2024-07-01 20:15 ` Krzysztof Wilczyński
2024-07-02 6:59 ` Philipp Stanner
2020-09-09 2:38 Stephen Rothwell
2020-09-15 3:43 ` Stephen Rothwell
2020-09-09 2:37 Stephen Rothwell
2020-09-09 16:06 ` Rob Herring
2020-09-15 3:47 ` Stephen Rothwell
2020-09-15 10:53 ` Lorenzo Pieralisi
2020-09-15 17:22 ` Bjorn Helgaas
2020-09-02 1:07 Stephen Rothwell
2020-09-02 12:33 ` Bjorn Helgaas
2020-09-02 14:13 ` Vaibhav Gupta
2020-08-05 1:32 Stephen Rothwell
2020-08-05 2:29 ` Bjorn Helgaas
2013-09-03 23:55 Stephen Rothwell
2013-09-03 23:59 ` Bjorn Helgaas
2012-12-10 9:03 Stephen Rothwell
2012-12-10 21:25 ` Bjorn Helgaas
2012-12-10 23:21 ` Bjorn Helgaas
2012-05-01 6:08 Stephen Rothwell
2012-05-01 7:35 ` Yinghai Lu
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=20160623164848.GE17987@localhost \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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.