linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the pci tree
@ 2020-09-09  2:37 Stephen Rothwell
  2020-09-09 16:06 ` Rob Herring
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2020-09-09  2:37 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Lorenzo Pieralisi, Rob Herring, Linux Next Mailing List,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 525 bytes --]

Hi all,

After merging the pci tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

drivers/pci/controller/dwc/pci-dra7xx.c: In function 'dra7xx_pcie_establish_link':
drivers/pci/controller/dwc/pci-dra7xx.c:142:6: warning: unused variable 'exp_cap_off' [-Wunused-variable]
  142 |  u32 exp_cap_off = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
      |      ^~~~~~~~~~~

Introduced by commit

  3af45d34d30c ("PCI: dwc: Centralize link gen setting")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2020-09-09  2:37 linux-next: build warning after merge of the pci tree Stephen Rothwell
@ 2020-09-09 16:06 ` Rob Herring
  2020-09-15  3:47   ` Stephen Rothwell
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2020-09-09 16:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Bjorn Helgaas, Lorenzo Pieralisi, Linux Next Mailing List,
	Linux Kernel Mailing List

On Tue, Sep 8, 2020 at 8:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the pci tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:

Uggg. I guess 0-day just doesn't do arm32 builds anymore as it caught
more obscure build issues, but not this one (and some others I've had
recently).

> drivers/pci/controller/dwc/pci-dra7xx.c: In function 'dra7xx_pcie_establish_link':
> drivers/pci/controller/dwc/pci-dra7xx.c:142:6: warning: unused variable 'exp_cap_off' [-Wunused-variable]
>   142 |  u32 exp_cap_off = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
>       |      ^~~~~~~~~~~
>
> Introduced by commit
>
>   3af45d34d30c ("PCI: dwc: Centralize link gen setting")
>
> --
> Cheers,
> Stephen Rothwell

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2020-09-09 16:06 ` Rob Herring
@ 2020-09-15  3:47   ` Stephen Rothwell
  2020-09-15 10:53     ` Lorenzo Pieralisi
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2020-09-15  3:47 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Rob Herring, Lorenzo Pieralisi, Linux Next Mailing List,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

Hi all,

On Wed, 9 Sep 2020 10:06:20 -0600 Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Sep 8, 2020 at 8:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the pci tree, today's linux-next build (arm
> > multi_v7_defconfig) produced this warning:  
> 
> Uggg. I guess 0-day just doesn't do arm32 builds anymore as it caught
> more obscure build issues, but not this one (and some others I've had
> recently).
> 
> > drivers/pci/controller/dwc/pci-dra7xx.c: In function 'dra7xx_pcie_establish_link':
> > drivers/pci/controller/dwc/pci-dra7xx.c:142:6: warning: unused variable 'exp_cap_off' [-Wunused-variable]
> >   142 |  u32 exp_cap_off = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
> >       |      ^~~~~~~~~~~
> >
> > Introduced by commit
> >
> >   3af45d34d30c ("PCI: dwc: Centralize link gen setting")

I am still getting this warning.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2020-09-15  3:47   ` Stephen Rothwell
@ 2020-09-15 10:53     ` Lorenzo Pieralisi
  2020-09-15 17:22       ` Bjorn Helgaas
  0 siblings, 1 reply; 22+ messages in thread
From: Lorenzo Pieralisi @ 2020-09-15 10:53 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Bjorn Helgaas, Rob Herring, Linux Next Mailing List,
	Linux Kernel Mailing List

On Tue, Sep 15, 2020 at 01:47:21PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> On Wed, 9 Sep 2020 10:06:20 -0600 Rob Herring <robh@kernel.org> wrote:
> >
> > On Tue, Sep 8, 2020 at 8:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > After merging the pci tree, today's linux-next build (arm
> > > multi_v7_defconfig) produced this warning:  
> > 
> > Uggg. I guess 0-day just doesn't do arm32 builds anymore as it caught
> > more obscure build issues, but not this one (and some others I've had
> > recently).
> > 
> > > drivers/pci/controller/dwc/pci-dra7xx.c: In function 'dra7xx_pcie_establish_link':
> > > drivers/pci/controller/dwc/pci-dra7xx.c:142:6: warning: unused variable 'exp_cap_off' [-Wunused-variable]
> > >   142 |  u32 exp_cap_off = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
> > >       |      ^~~~~~~~~~~
> > >
> > > Introduced by commit
> > >
> > >   3af45d34d30c ("PCI: dwc: Centralize link gen setting")
> 
> I am still getting this warning.

I have pushed out a fix-up on my pci/dwc branch, the warning should
disappear as soon as Bjorn pulls it.

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2020-09-15 10:53     ` Lorenzo Pieralisi
@ 2020-09-15 17:22       ` Bjorn Helgaas
  0 siblings, 0 replies; 22+ messages in thread
From: Bjorn Helgaas @ 2020-09-15 17:22 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Stephen Rothwell, Bjorn Helgaas, Rob Herring,
	Linux Next Mailing List, Linux Kernel Mailing List

On Tue, Sep 15, 2020 at 11:53:26AM +0100, Lorenzo Pieralisi wrote:
> On Tue, Sep 15, 2020 at 01:47:21PM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > On Wed, 9 Sep 2020 10:06:20 -0600 Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Tue, Sep 8, 2020 at 8:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > After merging the pci tree, today's linux-next build (arm
> > > > multi_v7_defconfig) produced this warning:  
> > > 
> > > Uggg. I guess 0-day just doesn't do arm32 builds anymore as it caught
> > > more obscure build issues, but not this one (and some others I've had
> > > recently).
> > > 
> > > > drivers/pci/controller/dwc/pci-dra7xx.c: In function 'dra7xx_pcie_establish_link':
> > > > drivers/pci/controller/dwc/pci-dra7xx.c:142:6: warning: unused variable 'exp_cap_off' [-Wunused-variable]
> > > >   142 |  u32 exp_cap_off = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
> > > >       |      ^~~~~~~~~~~
> > > >
> > > > Introduced by commit
> > > >
> > > >   3af45d34d30c ("PCI: dwc: Centralize link gen setting")
> > 
> > I am still getting this warning.
> 
> I have pushed out a fix-up on my pci/dwc branch, the warning should
> disappear as soon as Bjorn pulls it.

Thanks for the reminder.  Should be fixed.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2020-09-09  2:38 Stephen Rothwell
@ 2020-09-15  3:43 ` Stephen Rothwell
  0 siblings, 0 replies; 22+ messages in thread
From: Stephen Rothwell @ 2020-09-15  3:43 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Lorenzo Pieralisi, Rob Herring, Linux Next Mailing List,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

Hi All,

On Wed, 9 Sep 2020 12:38:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the pci tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> WARNING: modpost: "dw_pcie_link_set_max_speed" [vmlinux] is a static EXPORT_SYMBOL_GPL
> 
> Introduced by commit
> 
>   3af45d34d30c ("PCI: dwc: Centralize link gen setting")

I am still getting this warning.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* linux-next: build warning after merge of the pci tree
@ 2020-09-09  2:38 Stephen Rothwell
  2020-09-15  3:43 ` Stephen Rothwell
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2020-09-09  2:38 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Lorenzo Pieralisi, Rob Herring, Linux Next Mailing List,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

Hi all,

After merging the pci tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

WARNING: modpost: "dw_pcie_link_set_max_speed" [vmlinux] is a static EXPORT_SYMBOL_GPL

Introduced by commit

  3af45d34d30c ("PCI: dwc: Centralize link gen setting")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2020-09-02 12:33 ` Bjorn Helgaas
@ 2020-09-02 14:13   ` Vaibhav Gupta
  0 siblings, 0 replies; 22+ messages in thread
From: Vaibhav Gupta @ 2020-09-02 14:13 UTC (permalink / raw)
  To: Stephen Rothwell, Bjorn Helgaas
  Cc: Linux Next Mailing List, Linux Kernel Mailing List

On Wed, Sep 02, 2020 at 07:33:12AM -0500, Bjorn Helgaas wrote:
> On Wed, Sep 02, 2020 at 11:07:43AM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the pci tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> > 
> > drivers/pci/pci-driver.c: In function 'pci_pm_thaw_noirq':
> > drivers/pci/pci-driver.c:1037:6: warning: unused variable 'error' [-Wunused-variable]
> >  1037 |  int error;
> >       |      ^~~~~
> > drivers/pci/pci-driver.c: In function 'pci_pm_restore_noirq':
> > drivers/pci/pci-driver.c:1169:6: warning: unused variable 'error' [-Wunused-variable]
> >  1169 |  int error;
> >       |      ^~~~~
> > 
> > Introduced by commit
> > 
> >   89a8561c63d3 ("PCI: Remove unused pcibios_pm_ops")
Hello, I did compile test it with W=1 flag. I am sorry, I must have missed it.
> 
> Fixed, thanks!
Thanks for the fix.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2020-09-02  1:07 Stephen Rothwell
@ 2020-09-02 12:33 ` Bjorn Helgaas
  2020-09-02 14:13   ` Vaibhav Gupta
  0 siblings, 1 reply; 22+ messages in thread
From: Bjorn Helgaas @ 2020-09-02 12:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Bjorn Helgaas, Linux Next Mailing List,
	Linux Kernel Mailing List, Vaibhav Gupta

On Wed, Sep 02, 2020 at 11:07:43AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the pci tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> drivers/pci/pci-driver.c: In function 'pci_pm_thaw_noirq':
> drivers/pci/pci-driver.c:1037:6: warning: unused variable 'error' [-Wunused-variable]
>  1037 |  int error;
>       |      ^~~~~
> drivers/pci/pci-driver.c: In function 'pci_pm_restore_noirq':
> drivers/pci/pci-driver.c:1169:6: warning: unused variable 'error' [-Wunused-variable]
>  1169 |  int error;
>       |      ^~~~~
> 
> Introduced by commit
> 
>   89a8561c63d3 ("PCI: Remove unused pcibios_pm_ops")

Fixed, thanks!

^ permalink raw reply	[flat|nested] 22+ messages in thread

* linux-next: build warning after merge of the pci tree
@ 2020-09-02  1:07 Stephen Rothwell
  2020-09-02 12:33 ` Bjorn Helgaas
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2020-09-02  1:07 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Vaibhav Gupta

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

Hi all,

After merging the pci tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

drivers/pci/pci-driver.c: In function 'pci_pm_thaw_noirq':
drivers/pci/pci-driver.c:1037:6: warning: unused variable 'error' [-Wunused-variable]
 1037 |  int error;
      |      ^~~~~
drivers/pci/pci-driver.c: In function 'pci_pm_restore_noirq':
drivers/pci/pci-driver.c:1169:6: warning: unused variable 'error' [-Wunused-variable]
 1169 |  int error;
      |      ^~~~~

Introduced by commit

  89a8561c63d3 ("PCI: Remove unused pcibios_pm_ops")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2020-08-05  1:32 Stephen Rothwell
@ 2020-08-05  2:29 ` Bjorn Helgaas
  0 siblings, 0 replies; 22+ messages in thread
From: Bjorn Helgaas @ 2020-08-05  2:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Bjorn Helgaas, Linux Next Mailing List,
	Linux Kernel Mailing List, Krzysztof Wilczyński

On Wed, Aug 05, 2020 at 11:32:16AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the pci tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> drivers/pci/controller/pcie-altera.c: In function 'altera_pcie_parse_dt':
> drivers/pci/controller/pcie-altera.c:697:17: warning: unused variable 'dev' [-Wunused-variable]
>   697 |  struct device *dev = &pcie->pdev->dev;
>       |                 ^~~
> 
> Introduced by commit
> 
>   caecb05c8000 ("PCI: Remove dev_err() when handing an error from platform_get_irq()")

Yeah, I blew it, sorry.

e2dcd20b1645 ("PCI: controller: Convert to
devm_platform_ioremap_resource_byname()") removed one use of "dev",
and caecb05c8000 ("PCI: Remove dev_err() when handing an error from
platform_get_irq()") removed the other.  They were on independent
branches and I didn't catch it when merging them.  I thought I had
built the result, but I must not have.

Fixed and re-pushed.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* linux-next: build warning after merge of the pci tree
@ 2020-08-05  1:32 Stephen Rothwell
  2020-08-05  2:29 ` Bjorn Helgaas
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2020-08-05  1:32 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Krzysztof Wilczyński

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

Hi all,

After merging the pci tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

drivers/pci/controller/pcie-altera.c: In function 'altera_pcie_parse_dt':
drivers/pci/controller/pcie-altera.c:697:17: warning: unused variable 'dev' [-Wunused-variable]
  697 |  struct device *dev = &pcie->pdev->dev;
      |                 ^~~

Introduced by commit

  caecb05c8000 ("PCI: Remove dev_err() when handing an error from platform_get_irq()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2016-06-23 16:48 ` Bjorn Helgaas
@ 2016-06-24  8:07   ` Johannes Thumshirn
  0 siblings, 0 replies; 22+ messages in thread
From: Johannes Thumshirn @ 2016-06-24  8:07 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Stephen Rothwell, Bjorn Helgaas, linux-next, linux-kernel

On Thu, Jun 23, 2016 at 11:48:49AM -0500, Bjorn Helgaas wrote:
> 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.
> 

Looks good, thanks.
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2016-06-23  1:51 Stephen Rothwell
@ 2016-06-23 16:48 ` Bjorn Helgaas
  2016-06-24  8:07   ` Johannes Thumshirn
  0 siblings, 1 reply; 22+ messages in thread
From: Bjorn Helgaas @ 2016-06-23 16:48 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Bjorn Helgaas, linux-next, linux-kernel, Johannes Thumshirn

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)

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* linux-next: build warning after merge of the pci tree
@ 2016-06-23  1:51 Stephen Rothwell
  2016-06-23 16:48 ` Bjorn Helgaas
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2016-06-23  1:51 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-next, linux-kernel, Johannes Thumshirn

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")

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2013-09-03 23:55 Stephen Rothwell
@ 2013-09-03 23:59 ` Bjorn Helgaas
  0 siblings, 0 replies; 22+ messages in thread
From: Bjorn Helgaas @ 2013-09-03 23:59 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next list, linux-kernel

On Tue, Sep 3, 2013 at 5:55 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Bjorn,
>
> You have sent a pull request to Linus for the pci tree, but at the same
> time you have reset the branch I pull into linux-next to be v3.11.  So
> you have effectively removed all that code from linux-next until Linus'
> merges it :-(
>
> Ordering is important.

Oops, sorry about that!.  I jumped the gun because I forgot about your
dependency on that branch (stupid, I know, since that's the whole
point of it).  Next time I'll wait until after Linus pulls my tag.

Bjorn

^ permalink raw reply	[flat|nested] 22+ messages in thread

* linux-next: build warning after merge of the pci tree
@ 2013-09-03 23:55 Stephen Rothwell
  2013-09-03 23:59 ` Bjorn Helgaas
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2013-09-03 23:55 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

Hi Bjorn,

You have sent a pull request to Linus for the pci tree, but at the same
time you have reset the branch I pull into linux-next to be v3.11.  So
you have effectively removed all that code from linux-next until Linus'
merges it :-(

Ordering is important.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2012-12-10 21:25 ` Bjorn Helgaas
@ 2012-12-10 23:21   ` Bjorn Helgaas
  0 siblings, 0 replies; 22+ messages in thread
From: Bjorn Helgaas @ 2012-12-10 23:21 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Matthew Garrett, Seth Forshee

On Mon, Dec 10, 2012 at 2:25 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Mon, Dec 10, 2012 at 08:03:21PM +1100, Stephen Rothwell wrote:
>> Hi Bjorn,
>>
>> After merging the pci tree, today's linux-next build (powerpc
>> ppc44x_defconfig) produced this warning:
>>
>> drivers/pci/rom.c: In function 'pci_map_rom':
>> drivers/pci/rom.c:125:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>>
>> Introduced by commit 84c1b80e3263 ("PCI: Add support for non-BAR ROMs").
>
> I propose the following patch to fix this warning.  Any comments?  If
> it looks OK, I'll add it this afternoon.
>
> commit dbd3fc3345390a989a033427aa915a0dfb62149f
> Author: Bjorn Helgaas <bhelgaas@google.com>
> Date:   Mon Dec 10 11:24:42 2012 -0700
>
>     PCI: Use phys_addr_t for physical ROM address
>
>     Use phys_addr_t rather than "void *" for physical memory address.
>     This removes casts and fixes a "cast from pointer to integer of different
>     size" warning on ppc44x_defconfig.
>
>     Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

I applied this and pushed my -next branch.

> diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
> index fddb9f6..d07f3bb 100644
> --- a/arch/x86/pci/common.c
> +++ b/arch/x86/pci/common.c
> @@ -628,8 +628,8 @@ int pcibios_add_device(struct pci_dev *dev)
>                             (PCI_FUNC(dev->devfn) == rom->function) &&
>                             (dev->vendor == rom->vendor) &&
>                             (dev->device == rom->devid)) {
> -                               dev->rom = (void *)(unsigned long)(pa_data +
> -                                     offsetof(struct pci_setup_rom, romdata));
> +                               dev->rom = pa_data +
> +                                     offsetof(struct pci_setup_rom, romdata);
>                                 dev->romlen = rom->pcilen;
>                         }
>                 }
> diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
> index 3a3828f..ab886b7 100644
> --- a/drivers/pci/rom.c
> +++ b/drivers/pci/rom.c
> @@ -122,7 +122,7 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)
>          */
>         if (pdev->rom && pdev->romlen) {
>                 *size = pdev->romlen;
> -               return phys_to_virt((phys_addr_t)pdev->rom);
> +               return phys_to_virt(pdev->rom);
>         /*
>          * IORESOURCE_ROM_SHADOW set on x86, x86_64 and IA64 supports legacy
>          * memory map if the VGA enable bit of the Bridge Control register is
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index f116b2d..957563b 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -333,7 +333,7 @@ struct pci_dev {
>         };
>         struct pci_ats  *ats;   /* Address Translation Service */
>  #endif
> -       void *rom; /* Physical pointer to ROM if it's not from the BAR */
> +       phys_addr_t rom; /* Physical address of ROM if it's not from the BAR */
>         size_t romlen; /* Length of ROM if it's not from the BAR */
>  };
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2012-12-10  9:03 Stephen Rothwell
@ 2012-12-10 21:25 ` Bjorn Helgaas
  2012-12-10 23:21   ` Bjorn Helgaas
  0 siblings, 1 reply; 22+ messages in thread
From: Bjorn Helgaas @ 2012-12-10 21:25 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Matthew Garrett, Seth Forshee

On Mon, Dec 10, 2012 at 08:03:21PM +1100, Stephen Rothwell wrote:
> Hi Bjorn,
> 
> After merging the pci tree, today's linux-next build (powerpc
> ppc44x_defconfig) produced this warning:
> 
> drivers/pci/rom.c: In function 'pci_map_rom':
> drivers/pci/rom.c:125:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> 
> Introduced by commit 84c1b80e3263 ("PCI: Add support for non-BAR ROMs").

I propose the following patch to fix this warning.  Any comments?  If
it looks OK, I'll add it this afternoon.

commit dbd3fc3345390a989a033427aa915a0dfb62149f
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Mon Dec 10 11:24:42 2012 -0700

    PCI: Use phys_addr_t for physical ROM address
    
    Use phys_addr_t rather than "void *" for physical memory address.
    This removes casts and fixes a "cast from pointer to integer of different
    size" warning on ppc44x_defconfig.
    
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index fddb9f6..d07f3bb 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -628,8 +628,8 @@ int pcibios_add_device(struct pci_dev *dev)
 			    (PCI_FUNC(dev->devfn) == rom->function) &&
 			    (dev->vendor == rom->vendor) &&
 			    (dev->device == rom->devid)) {
-				dev->rom = (void *)(unsigned long)(pa_data +
-				      offsetof(struct pci_setup_rom, romdata));
+				dev->rom = pa_data +
+				      offsetof(struct pci_setup_rom, romdata);
 				dev->romlen = rom->pcilen;
 			}
 		}
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
index 3a3828f..ab886b7 100644
--- a/drivers/pci/rom.c
+++ b/drivers/pci/rom.c
@@ -122,7 +122,7 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)
 	 */
 	if (pdev->rom && pdev->romlen) {
 		*size = pdev->romlen;
-		return phys_to_virt((phys_addr_t)pdev->rom);
+		return phys_to_virt(pdev->rom);
 	/*
 	 * IORESOURCE_ROM_SHADOW set on x86, x86_64 and IA64 supports legacy
 	 * memory map if the VGA enable bit of the Bridge Control register is
diff --git a/include/linux/pci.h b/include/linux/pci.h
index f116b2d..957563b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -333,7 +333,7 @@ struct pci_dev {
 	};
 	struct pci_ats	*ats;	/* Address Translation Service */
 #endif
-	void *rom; /* Physical pointer to ROM if it's not from the BAR */
+	phys_addr_t rom; /* Physical address of ROM if it's not from the BAR */
 	size_t romlen; /* Length of ROM if it's not from the BAR */
 };
 

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* linux-next: build warning after merge of the pci tree
@ 2012-12-10  9:03 Stephen Rothwell
  2012-12-10 21:25 ` Bjorn Helgaas
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2012-12-10  9:03 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-next, linux-kernel, Matthew Garrett, Seth Forshee

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

Hi Bjorn,

After merging the pci tree, today's linux-next build (powerpc
ppc44x_defconfig) produced this warning:

drivers/pci/rom.c: In function 'pci_map_rom':
drivers/pci/rom.c:125:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Introduced by commit 84c1b80e3263 ("PCI: Add support for non-BAR ROMs").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build warning after merge of the pci tree
  2012-05-01  6:08 Stephen Rothwell
@ 2012-05-01  7:35 ` Yinghai Lu
  0 siblings, 0 replies; 22+ messages in thread
From: Yinghai Lu @ 2012-05-01  7:35 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Bjorn Helgaas, linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

On Mon, Apr 30, 2012 at 11:08 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Bjorn,
>
> After merging the pci tree, today's linux-next build (i386 defconfig)
> produced this warning:
>
> arch/x86/pci/amd_bus.c: In function 'early_fill_mp_bus_info':
> arch/x86/pci/amd_bus.c:56:6: warning: unused variable 'j' [-Wunused-variable]
>
> Introduced by commit d28e5ac2a07e ("x86/PCI: dynamically allocate
> pci_root_info for native host bridge drivers").
>

please check attached patch.

Thanks

Yinghai

[-- Attachment #2: amd_bus_warning.patch --]
[-- Type: application/octet-stream, Size: 1361 bytes --]

Subject: [PATCH] PCI/x86: Fix unused warning with amd_bus

Have separated function for that.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>

diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
index 459a731..5aed49b 100644
--- a/arch/x86/pci/amd_bus.c
+++ b/arch/x86/pci/amd_bus.c
@@ -44,6 +44,15 @@ static struct pci_root_info __init *find_pci_root_info(int node, int link)
 	return NULL;
 }
 
+static void __init set_mp_bus_range_to_node(int min_bus, int max_bus, int node)
+{
+#ifdef CONFIG_NUMA
+	int j;
+
+	for (j = min_bus; j <= max_bus; j++)
+		set_mp_bus_to_node(j, node);
+#endif
+}
 /**
  * early_fill_mp_bus_to_node()
  * called before pcibios_scan_root and pci_scan_bus
@@ -53,7 +62,6 @@ static struct pci_root_info __init *find_pci_root_info(int node, int link)
 static int __init early_fill_mp_bus_info(void)
 {
 	int i;
-	int j;
 	unsigned bus;
 	unsigned slot;
 	int node;
@@ -109,10 +117,7 @@ static int __init early_fill_mp_bus_info(void)
 		min_bus = (reg >> 16) & 0xff;
 		max_bus = (reg >> 24) & 0xff;
 		node = (reg >> 4) & 0x07;
-#ifdef CONFIG_NUMA
-		for (j = min_bus; j <= max_bus; j++)
-			set_mp_bus_to_node(j, node);
-#endif
+		set_mp_bus_range_to_node(min_bus, max_bus, node);
 		link = (reg >> 8) & 0x03;
 
 		info = alloc_pci_root_info(min_bus, max_bus, node, link);

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* linux-next: build warning after merge of the pci tree
@ 2012-05-01  6:08 Stephen Rothwell
  2012-05-01  7:35 ` Yinghai Lu
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2012-05-01  6:08 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-next, linux-kernel, Yinghai Lu

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

Hi Bjorn,

After merging the pci tree, today's linux-next build (i386 defconfig)
produced this warning:

arch/x86/pci/amd_bus.c: In function 'early_fill_mp_bus_info':
arch/x86/pci/amd_bus.c:56:6: warning: unused variable 'j' [-Wunused-variable]

Introduced by commit d28e5ac2a07e ("x86/PCI: dynamically allocate
pci_root_info for native host bridge drivers").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-09-15 18:57 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09  2:37 linux-next: build warning after merge of the pci tree 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
  -- strict thread matches above, loose matches on Subject: below --
2020-09-09  2:38 Stephen Rothwell
2020-09-15  3:43 ` Stephen Rothwell
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
2016-06-23  1:51 Stephen Rothwell
2016-06-23 16:48 ` Bjorn Helgaas
2016-06-24  8:07   ` Johannes Thumshirn
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

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).