All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powernv: Use __printf in pe_level_printk
@ 2016-07-14 15:45 Joe Perches
  2016-07-15  4:36 ` Michael Ellerman
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Joe Perches @ 2016-07-14 15:45 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel

Make the compiler detect format and argument mismatches.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/powerpc/platforms/powernv/pci.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h
index 3a97990..1c1a586 100644
--- a/arch/powerpc/platforms/powernv/pci.h
+++ b/arch/powerpc/platforms/powernv/pci.h
@@ -213,6 +213,7 @@ extern void pnv_pci_dma_bus_setup(struct pci_bus *bus);
 extern int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type);
 extern void pnv_teardown_msi_irqs(struct pci_dev *pdev);
 
+__printf(3, 4)
 extern void pe_level_printk(const struct pnv_ioda_pe *pe, const char *level,
 			    const char *fmt, ...);
 #define pe_err(pe, fmt, ...)					\
-- 
2.8.0.rc4.16.g56331f8

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

* Re: [PATCH] powernv: Use __printf in pe_level_printk
  2016-07-14 15:45 [PATCH] powernv: Use __printf in pe_level_printk Joe Perches
@ 2016-07-15  4:36 ` Michael Ellerman
  2016-07-15  4:59   ` Joe Perches
  2016-07-22  5:34 ` kbuild test robot
  2016-07-22  7:45 ` kbuild test robot
  2 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2016-07-15  4:36 UTC (permalink / raw)
  To: Joe Perches, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

Joe Perches <joe@perches.com> writes:

> Make the compiler detect format and argument mismatches.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/powerpc/platforms/powernv/pci.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platform=
s/powernv/pci.h
> index 3a97990..1c1a586 100644
> --- a/arch/powerpc/platforms/powernv/pci.h
> +++ b/arch/powerpc/platforms/powernv/pci.h
> @@ -213,6 +213,7 @@ extern void pnv_pci_dma_bus_setup(struct pci_bus *bus=
);
>  extern int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type);
>  extern void pnv_teardown_msi_irqs(struct pci_dev *pdev);
>=20=20
> +__printf(3, 4)
>  extern void pe_level_printk(const struct pnv_ioda_pe *pe, const char *le=
vel,
>  			    const char *fmt, ...);

Thanks, but it breaks the build due to lots of new warnings.

We'll have to fix those before merging it.

cheers

In file included from ../arch/powerpc/platforms/powernv/pci-ioda.c:49:0:
../arch/powerpc/platforms/powernv/pci-ioda.c: In function =E2=80=98pnv_ioda=
_deconfigure_pe=E2=80=99:
../arch/powerpc/platforms/powernv/pci-ioda.c:784:15: error: format =E2=80=
=98%ld=E2=80=99 expects argument of type =E2=80=98long int=E2=80=99, but ar=
gument 4 has type =E2=80=98int64_t {aka long long int}=E2=80=99 [-Werror=3D=
format=3D]
   pe_warn(pe, "OPAL error %ld remove self from PELTV\n", rc);
               ^
../arch/powerpc/platforms/powernv/pci.h:233:36: note: in definition of macr=
o =E2=80=98pe_warn=E2=80=99
  pe_level_printk(pe, KERN_WARNING, fmt, ##__VA_ARGS__)
                                    ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c:788:14: error: format =E2=80=
=98%ld=E2=80=99 expects argument of type =E2=80=98long int=E2=80=99, but ar=
gument 4 has type =E2=80=98int64_t {aka long long int}=E2=80=99 [-Werror=3D=
format=3D]
   pe_err(pe, "OPAL error %ld trying to setup PELT table\n", rc);
              ^
../arch/powerpc/platforms/powernv/pci.h:231:32: note: in definition of macr=
o =E2=80=98pe_err=E2=80=99
  pe_level_printk(pe, KERN_ERR, fmt, ##__VA_ARGS__)
                                ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c: In function =E2=80=98pnv_ioda=
_setup_bus_PE=E2=80=99:
../arch/powerpc/platforms/powernv/pci-ioda.c:1095:15: error: format =E2=80=
=98%d=E2=80=99 expects argument of type =E2=80=98int=E2=80=99, but argument=
 4 has type =E2=80=98resource_size_t {aka long long unsigned int}=E2=80=99 =
[-Werror=3Dformat=3D]
   pe_info(pe, "Secondary bus %d..%d associated with PE#%d\n",
               ^
../arch/powerpc/platforms/powernv/pci.h:235:33: note: in definition of macr=
o =E2=80=98pe_info=E2=80=99
  pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                 ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c:1095:15: error: format =E2=80=
=98%d=E2=80=99 expects argument of type =E2=80=98int=E2=80=99, but argument=
 5 has type =E2=80=98resource_size_t {aka long long unsigned int}=E2=80=99 =
[-Werror=3Dformat=3D]
   pe_info(pe, "Secondary bus %d..%d associated with PE#%d\n",
               ^
../arch/powerpc/platforms/powernv/pci.h:235:33: note: in definition of macr=
o =E2=80=98pe_info=E2=80=99
  pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                 ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c:1098:15: error: format =E2=80=
=98%d=E2=80=99 expects argument of type =E2=80=98int=E2=80=99, but argument=
 4 has type =E2=80=98resource_size_t {aka long long unsigned int}=E2=80=99 =
[-Werror=3Dformat=3D]
   pe_info(pe, "Secondary bus %d associated with PE#%d\n",
               ^
../arch/powerpc/platforms/powernv/pci.h:235:33: note: in definition of macr=
o =E2=80=98pe_info=E2=80=99
  pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                 ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c: In function =E2=80=98pnv_pci_=
ioda2_release_dma_pe=E2=80=99:
../arch/powerpc/platforms/powernv/pci-ioda.c:1351:15: error: format =E2=80=
=98%ld=E2=80=99 expects argument of type =E2=80=98long int=E2=80=99, but ar=
gument 4 has type =E2=80=98int64_t {aka long long int}=E2=80=99 [-Werror=3D=
format=3D]
   pe_warn(pe, "OPAL error %ld release DMA window\n", rc);
               ^
../arch/powerpc/platforms/powernv/pci.h:233:36: note: in definition of macr=
o =E2=80=98pe_warn=E2=80=99
  pe_level_printk(pe, KERN_WARNING, fmt, ##__VA_ARGS__)
                                    ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c: In function =E2=80=98pnv_pci_=
ioda1_setup_dma_pe=E2=80=99:
../arch/powerpc/platforms/powernv/pci-ioda.c:2093:15: error: format =E2=80=
=98%ld=E2=80=99 expects argument of type =E2=80=98long int=E2=80=99, but ar=
gument 4 has type =E2=80=98int64_t {aka long long int}=E2=80=99 [-Werror=3D=
format=3D]
    pe_err(pe, " Failed to configure 32-bit TCE table,"
               ^
../arch/powerpc/platforms/powernv/pci.h:231:32: note: in definition of macr=
o =E2=80=98pe_err=E2=80=99
  pe_level_printk(pe, KERN_ERR, fmt, ##__VA_ARGS__)
                                ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c: In function =E2=80=98pnv_pci_=
ioda2_set_window=E2=80=99:
../arch/powerpc/platforms/powernv/pci-ioda.c:2153:14: error: format =E2=80=
=98%x=E2=80=99 expects argument of type =E2=80=98unsigned int=E2=80=99, but=
 argument 7 has type =E2=80=98long unsigned int=E2=80=99 [-Werror=3Dformat=
=3D]
  pe_info(pe, "Setting up window#%d %llx..%llx pg=3D%x\n", num,
              ^
../arch/powerpc/platforms/powernv/pci.h:235:33: note: in definition of macr=
o =E2=80=98pe_info=E2=80=99
  pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                 ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c:2169:14: error: format =E2=80=
=98%ld=E2=80=99 expects argument of type =E2=80=98long int=E2=80=99, but ar=
gument 4 has type =E2=80=98int64_t {aka long long int}=E2=80=99 [-Werror=3D=
format=3D]
   pe_err(pe, "Failed to configure TCE table, err %ld\n", rc);
              ^
../arch/powerpc/platforms/powernv/pci.h:231:32: note: in definition of macr=
o =E2=80=98pe_err=E2=80=99
  pe_level_printk(pe, KERN_ERR, fmt, ##__VA_ARGS__)
                                ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c: In function =E2=80=98pnv_pci_=
ioda2_release_pe_dma=E2=80=99:
../arch/powerpc/platforms/powernv/pci-ioda.c:3312:15: error: format =E2=80=
=98%ld=E2=80=99 expects argument of type =E2=80=98long int=E2=80=99, but ar=
gument 4 has type =E2=80=98int64_t {aka long long int}=E2=80=99 [-Werror=3D=
format=3D]
   pe_warn(pe, "OPAL error %ld release DMA window\n", rc);
               ^
../arch/powerpc/platforms/powernv/pci.h:233:36: note: in definition of macr=
o =E2=80=98pe_warn=E2=80=99
  pe_level_printk(pe, KERN_WARNING, fmt, ##__VA_ARGS__)
                                    ^~~
../arch/powerpc/platforms/powernv/pci-ioda.c: In function =E2=80=98pnv_ioda=
_free_pe_seg=E2=80=99:
../arch/powerpc/platforms/powernv/pci-ioda.c:3347:16: error: format =E2=80=
=98%ld=E2=80=99 expects argument of type =E2=80=98long int=E2=80=99, but ar=
gument 4 has type =E2=80=98int64_t {aka long long int}=E2=80=99 [-Werror=3D=
format=3D]
    pe_warn(pe, "Error %ld unmapping (%d) segment#%d\n",
                ^
../arch/powerpc/platforms/powernv/pci.h:233:36: note: in definition of macr=
o =E2=80=98pe_warn=E2=80=99
  pe_level_printk(pe, KERN_WARNING, fmt, ##__VA_ARGS__)
                                    ^~~

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

* Re: [PATCH] powernv: Use __printf in pe_level_printk
  2016-07-15  4:36 ` Michael Ellerman
@ 2016-07-15  4:59   ` Joe Perches
  2016-07-15  5:36     ` Michael Ellerman
  0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2016-07-15  4:59 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

On Fri, 2016-07-15 at 14:36 +1000, Michael Ellerman wrote:
> Joe Perches <joe@perches.com> writes:
> 
> > 
> > Make the compiler detect format and argument mismatches.
> > 
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> >  arch/powerpc/platforms/powernv/pci.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/powerpc/platforms/powernv/pci.h
> > b/arch/powerpc/platforms/powernv/pci.h
> > index 3a97990..1c1a586 100644
> > --- a/arch/powerpc/platforms/powernv/pci.h
> > +++ b/arch/powerpc/platforms/powernv/pci.h
> > @@ -213,6 +213,7 @@ extern void pnv_pci_dma_bus_setup(struct pci_bus
> > *bus);
> >  extern int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int
> > type);
> >  extern void pnv_teardown_msi_irqs(struct pci_dev *pdev);
> >  
> > +__printf(3, 4)
> >  extern void pe_level_printk(const struct pnv_ioda_pe *pe, const
> > char *level,
> >  			    const char *fmt, ...);
> Thanks, but it breaks the build due to lots of new warnings.
> 
> We'll have to fix those before merging it.

Good.  Are you going to fix those?

I thought I did a powerpc defconfig build of arch/powerpc/
and I believe it finished without error, but I'm pleased
it found some defects.

I think it's now marked "rejected" in patchwork.
Perhaps it'd better to mark it "deferred" instead.

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

* Re: [PATCH] powernv: Use __printf in pe_level_printk
  2016-07-15  4:59   ` Joe Perches
@ 2016-07-15  5:36     ` Michael Ellerman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2016-07-15  5:36 UTC (permalink / raw)
  To: Joe Perches, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

Joe Perches <joe@perches.com> writes:

> On Fri, 2016-07-15 at 14:36 +1000, Michael Ellerman wrote:
>> Joe Perches <joe@perches.com> writes:
>> >=20
>> > diff --git a/arch/powerpc/platforms/powernv/pci.h
>> > b/arch/powerpc/platforms/powernv/pci.h
>> > index 3a97990..1c1a586 100644
>> > --- a/arch/powerpc/platforms/powernv/pci.h
>> > +++ b/arch/powerpc/platforms/powernv/pci.h
>> > @@ -213,6 +213,7 @@ extern void pnv_pci_dma_bus_setup(struct pci_bus
>> > *bus);
>> > =C2=A0extern int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int
>> > type);
>> > =C2=A0extern void pnv_teardown_msi_irqs(struct pci_dev *pdev);
>> > =C2=A0
>> > +__printf(3, 4)
>> > =C2=A0extern void pe_level_printk(const struct pnv_ioda_pe *pe, const
>> > char *level,
>> > =C2=A0			=C2=A0=C2=A0=C2=A0=C2=A0const char *fmt, ...);
>> Thanks, but it breaks the build due to lots of new warnings.
>>=20
>> We'll have to fix those before merging it.
>
> Good. =C2=A0Are you going to fix those?

Not this month.

> I thought I did a powerpc defconfig build of arch/powerpc/
> and I believe it finished without error, but I'm pleased
> it found some defects.

Hmm, I'd be surprised, but it might depend on the exact config /
compiler etc.

> I think it's now marked "rejected" in patchwork.
> Perhaps it'd better to mark it "deferred" instead.

I can do that. Though realistically I'm unlikely to go back and find it.

cheers

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

* Re: [PATCH] powernv: Use __printf in pe_level_printk
  2016-07-14 15:45 [PATCH] powernv: Use __printf in pe_level_printk Joe Perches
  2016-07-15  4:36 ` Michael Ellerman
@ 2016-07-22  5:34 ` kbuild test robot
  2016-07-22  7:45 ` kbuild test robot
  2 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2016-07-22  5:34 UTC (permalink / raw)
  To: Joe Perches
  Cc: kbuild-all, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel

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

Hi,

[auto build test ERROR on v4.7-rc7]
[also build test ERROR on next-20160721]
[cannot apply to powerpc/next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Joe-Perches/powernv-Use-__printf-in-pe_level_printk/20160715-171449
config: powerpc-ppc64_defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   In file included from arch/powerpc/platforms/powernv/pci-ioda.c:49:0:
   arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_ioda_setup_bus_PE':
>> arch/powerpc/platforms/powernv/pci-ioda.c:1067:15: error: format '%d' expects argument of type 'int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=]
      pe_info(pe, "Secondary bus %d..%d associated with PE#%d\n",
                  ^
   arch/powerpc/platforms/powernv/pci.h:224:33: note: in definition of macro 'pe_info'
     pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^
   arch/powerpc/platforms/powernv/pci-ioda.c:1067:15: error: format '%d' expects argument of type 'int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=]
      pe_info(pe, "Secondary bus %d..%d associated with PE#%d\n",
                  ^
   arch/powerpc/platforms/powernv/pci.h:224:33: note: in definition of macro 'pe_info'
     pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^
   arch/powerpc/platforms/powernv/pci-ioda.c:1070:15: error: format '%d' expects argument of type 'int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=]
      pe_info(pe, "Secondary bus %d associated with PE#%d\n",
                  ^
   arch/powerpc/platforms/powernv/pci.h:224:33: note: in definition of macro 'pe_info'
     pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^
   arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_pci_ioda1_setup_dma_pe':
>> arch/powerpc/platforms/powernv/pci-ioda.c:2100:15: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'int64_t {aka long long int}' [-Werror=format=]
       pe_err(pe, " Failed to configure 32-bit TCE table,"
                  ^
   arch/powerpc/platforms/powernv/pci.h:220:32: note: in definition of macro 'pe_err'
     pe_level_printk(pe, KERN_ERR, fmt, ##__VA_ARGS__)
                                   ^
   arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_pci_ioda2_set_window':
>> arch/powerpc/platforms/powernv/pci-ioda.c:2160:14: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Werror=format=]
     pe_info(pe, "Setting up window#%d %llx..%llx pg=%x\n", num,
                 ^
   arch/powerpc/platforms/powernv/pci.h:224:33: note: in definition of macro 'pe_info'
     pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^
   arch/powerpc/platforms/powernv/pci-ioda.c:2176:14: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'int64_t {aka long long int}' [-Werror=format=]
      pe_err(pe, "Failed to configure TCE table, err %ld\n", rc);
                 ^
   arch/powerpc/platforms/powernv/pci.h:220:32: note: in definition of macro 'pe_err'
     pe_level_printk(pe, KERN_ERR, fmt, ##__VA_ARGS__)
                                   ^
   cc1: all warnings being treated as errors

vim +1067 arch/powerpc/platforms/powernv/pci-ioda.c

184cd4a3 Benjamin Herrenschmidt 2011-11-15  1061  	pe->pbus = bus;
184cd4a3 Benjamin Herrenschmidt 2011-11-15  1062  	pe->pdev = NULL;
184cd4a3 Benjamin Herrenschmidt 2011-11-15  1063  	pe->mve_number = -1;
b918c62e Yinghai Lu             2012-05-17  1064  	pe->rid = bus->busn_res.start << 8;
184cd4a3 Benjamin Herrenschmidt 2011-11-15  1065  
fb446ad0 Gavin Shan             2012-08-20  1066  	if (all)
fb446ad0 Gavin Shan             2012-08-20 @1067  		pe_info(pe, "Secondary bus %d..%d associated with PE#%d\n",
1e916772 Gavin Shan             2016-05-03  1068  			bus->busn_res.start, bus->busn_res.end, pe->pe_number);
fb446ad0 Gavin Shan             2012-08-20  1069  	else
fb446ad0 Gavin Shan             2012-08-20 @1070  		pe_info(pe, "Secondary bus %d associated with PE#%d\n",
1e916772 Gavin Shan             2016-05-03  1071  			bus->busn_res.start, pe->pe_number);
184cd4a3 Benjamin Herrenschmidt 2011-11-15  1072  
184cd4a3 Benjamin Herrenschmidt 2011-11-15  1073  	if (pnv_ioda_configure_pe(phb, pe)) {

:::::: The code at line 1067 was first introduced by commit
:::::: fb446ad075cfa5212b26c4f77751faefe574ad8b powerpc/powernv: Create bus sensitive PEs

:::::: TO: Gavin Shan <shangw@linux.vnet.ibm.com>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 22286 bytes --]

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

* Re: [PATCH] powernv: Use __printf in pe_level_printk
  2016-07-14 15:45 [PATCH] powernv: Use __printf in pe_level_printk Joe Perches
  2016-07-15  4:36 ` Michael Ellerman
  2016-07-22  5:34 ` kbuild test robot
@ 2016-07-22  7:45 ` kbuild test robot
  2 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2016-07-22  7:45 UTC (permalink / raw)
  To: Joe Perches
  Cc: kbuild-all, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, linux-kernel

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

Hi,

[auto build test WARNING on v4.7-rc7]
[also build test WARNING on next-20160721]
[cannot apply to powerpc/next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Joe-Perches/powernv-Use-__printf-in-pe_level_printk/20160715-171449
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

   In file included from arch/powerpc/platforms/powernv/pci-ioda.c:49:0:
   arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_ioda_deconfigure_pe':
>> arch/powerpc/platforms/powernv/pci-ioda.c:784:15: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'int64_t {aka long long int}' [-Wformat=]
      pe_warn(pe, "OPAL error %ld remove self from PELTV\n", rc);
                  ^
   arch/powerpc/platforms/powernv/pci.h:222:36: note: in definition of macro 'pe_warn'
     pe_level_printk(pe, KERN_WARNING, fmt, ##__VA_ARGS__)
                                       ^
   arch/powerpc/platforms/powernv/pci-ioda.c:788:14: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'int64_t {aka long long int}' [-Wformat=]
      pe_err(pe, "OPAL error %ld trying to setup PELT table\n", rc);
                 ^
   arch/powerpc/platforms/powernv/pci.h:220:32: note: in definition of macro 'pe_err'
     pe_level_printk(pe, KERN_ERR, fmt, ##__VA_ARGS__)
                                   ^
   arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_ioda_setup_bus_PE':
>> arch/powerpc/platforms/powernv/pci-ioda.c:1067:15: warning: format '%d' expects argument of type 'int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=]
      pe_info(pe, "Secondary bus %d..%d associated with PE#%d\n",
                  ^
   arch/powerpc/platforms/powernv/pci.h:224:33: note: in definition of macro 'pe_info'
     pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^
   arch/powerpc/platforms/powernv/pci-ioda.c:1067:15: warning: format '%d' expects argument of type 'int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=]
      pe_info(pe, "Secondary bus %d..%d associated with PE#%d\n",
                  ^
   arch/powerpc/platforms/powernv/pci.h:224:33: note: in definition of macro 'pe_info'
     pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^
   arch/powerpc/platforms/powernv/pci-ioda.c:1070:15: warning: format '%d' expects argument of type 'int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=]
      pe_info(pe, "Secondary bus %d associated with PE#%d\n",
                  ^
   arch/powerpc/platforms/powernv/pci.h:224:33: note: in definition of macro 'pe_info'
     pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^
   arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_pci_ioda2_release_dma_pe':
   arch/powerpc/platforms/powernv/pci-ioda.c:1358:15: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'int64_t {aka long long int}' [-Wformat=]
      pe_warn(pe, "OPAL error %ld release DMA window\n", rc);
                  ^
   arch/powerpc/platforms/powernv/pci.h:222:36: note: in definition of macro 'pe_warn'
     pe_level_printk(pe, KERN_WARNING, fmt, ##__VA_ARGS__)
                                       ^
   arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_pci_ioda1_setup_dma_pe':
   arch/powerpc/platforms/powernv/pci-ioda.c:2100:15: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'int64_t {aka long long int}' [-Wformat=]
       pe_err(pe, " Failed to configure 32-bit TCE table,"
                  ^
   arch/powerpc/platforms/powernv/pci.h:220:32: note: in definition of macro 'pe_err'
     pe_level_printk(pe, KERN_ERR, fmt, ##__VA_ARGS__)
                                   ^
   arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_pci_ioda2_set_window':
>> arch/powerpc/platforms/powernv/pci-ioda.c:2160:14: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Wformat=]
     pe_info(pe, "Setting up window#%d %llx..%llx pg=%x\n", num,
                 ^
   arch/powerpc/platforms/powernv/pci.h:224:33: note: in definition of macro 'pe_info'
     pe_level_printk(pe, KERN_INFO, fmt, ##__VA_ARGS__)
                                    ^
   arch/powerpc/platforms/powernv/pci-ioda.c:2176:14: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'int64_t {aka long long int}' [-Wformat=]
      pe_err(pe, "Failed to configure TCE table, err %ld\n", rc);
                 ^
   arch/powerpc/platforms/powernv/pci.h:220:32: note: in definition of macro 'pe_err'
     pe_level_printk(pe, KERN_ERR, fmt, ##__VA_ARGS__)
                                   ^

vim +784 arch/powerpc/platforms/powernv/pci-ioda.c

781a868f Wei Yang 2015-03-25  778  				  OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
781a868f Wei Yang 2015-03-25  779  
781a868f Wei Yang 2015-03-25  780  	/* Disassociate PE in PELT */
781a868f Wei Yang 2015-03-25  781  	rc = opal_pci_set_peltv(phb->opal_id, pe->pe_number,
781a868f Wei Yang 2015-03-25  782  				pe->pe_number, OPAL_REMOVE_PE_FROM_DOMAIN);
781a868f Wei Yang 2015-03-25  783  	if (rc)
781a868f Wei Yang 2015-03-25 @784  		pe_warn(pe, "OPAL error %ld remove self from PELTV\n", rc);
781a868f Wei Yang 2015-03-25  785  	rc = opal_pci_set_pe(phb->opal_id, pe->pe_number, pe->rid,
781a868f Wei Yang 2015-03-25  786  			     bcomp, dcomp, fcomp, OPAL_UNMAP_PE);
781a868f Wei Yang 2015-03-25  787  	if (rc)
781a868f Wei Yang 2015-03-25 @788  		pe_err(pe, "OPAL error %ld trying to setup PELT table\n", rc);
781a868f Wei Yang 2015-03-25  789  
781a868f Wei Yang 2015-03-25  790  	pe->pbus = NULL;
781a868f Wei Yang 2015-03-25  791  	pe->pdev = NULL;

:::::: The code at line 784 was first introduced by commit
:::::: 781a868f3136c6eb8e8c5c19d148416d7da86610 powerpc/powernv: Shift VF resource with an offset

:::::: TO: Wei Yang <weiyang@linux.vnet.ibm.com>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 49193 bytes --]

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

end of thread, other threads:[~2016-07-22  7:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 15:45 [PATCH] powernv: Use __printf in pe_level_printk Joe Perches
2016-07-15  4:36 ` Michael Ellerman
2016-07-15  4:59   ` Joe Perches
2016-07-15  5:36     ` Michael Ellerman
2016-07-22  5:34 ` kbuild test robot
2016-07-22  7:45 ` kbuild test robot

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.