Re: linux-next: build warning after merge of the char-misc tree

2021-04-06 Thread Greg KH
On Tue, Apr 06, 2021 at 05:28:36PM +, Gustavo Pimentel wrote:
> On Tue, Apr 6, 2021 at 15:15:40, Greg KH  wrote:
> 
> > On Tue, Apr 06, 2021 at 02:13:53PM +, Gustavo Pimentel wrote:
> > > On Tue, Apr 6, 2021 at 15:7:23, Greg KH  wrote:
> > > 
> > > > On Tue, Apr 06, 2021 at 09:44:41PM +1000, Stephen Rothwell wrote:
> > > > > Hi all,
> > > > > 
> > > > > After merging the char-misc tree, today's linux-next build (htmldocs)
> > > > > produced this warning:
> > > > > 
> > > > > Documentation/misc-devices/dw-xdata-pcie.rst:20: WARNING: Unexpected 
> > > > > indentation.
> > > > > Documentation/misc-devices/dw-xdata-pcie.rst:24: WARNING: Unexpected 
> > > > > indentation.
> > > > > Documentation/misc-devices/dw-xdata-pcie.rst:25: WARNING: Block quote 
> > > > > ends without a blank line; unexpected unindent.
> > > > > Documentation/misc-devices/dw-xdata-pcie.rst:30: WARNING: Unexpected 
> > > > > indentation.
> > > > > Documentation/misc-devices/dw-xdata-pcie.rst:34: WARNING: Unexpected 
> > > > > indentation.
> > > > > Documentation/misc-devices/dw-xdata-pcie.rst:35: WARNING: Block quote 
> > > > > ends without a blank line; unexpected unindent.
> > > > > Documentation/misc-devices/dw-xdata-pcie.rst:40: WARNING: Unexpected 
> > > > > indentation.
> > > > > 
> > > > > Introduced by commit
> > > > > 
> > > > >   e1181b5bbc3c ("Documentation: misc-devices: Add Documentation for 
> > > > > dw-xdata-pcie driver")
> > > > 
> > > > Gustavo, can you send a follow-on patch to fix this up?
> > > 
> > > Yes, I have already made a fix for it.
> > > My apologies for my ignorance on this matter, there is some way to check 
> > > if my fixes are okay through some script or other way as Stephen has 
> > > done?
> > 
> > Yes, run 'make htmldocs' in the kernel tree with your change applied and
> > see if the warnings go away.
> 
> Done. I submitted now the v11 with the fixes.

I can not take these as your patches are already in my public tree.  I
can revert the existing ones, but that's a mess, just send me a set of
patches to fix this issue, like you would for any future change to this
driver.

thanks,

greg k-h


RE: linux-next: build warning after merge of the char-misc tree

2021-04-06 Thread Gustavo Pimentel
On Tue, Apr 6, 2021 at 15:15:40, Greg KH  wrote:

> On Tue, Apr 06, 2021 at 02:13:53PM +, Gustavo Pimentel wrote:
> > On Tue, Apr 6, 2021 at 15:7:23, Greg KH  wrote:
> > 
> > > On Tue, Apr 06, 2021 at 09:44:41PM +1000, Stephen Rothwell wrote:
> > > > Hi all,
> > > > 
> > > > After merging the char-misc tree, today's linux-next build (htmldocs)
> > > > produced this warning:
> > > > 
> > > > Documentation/misc-devices/dw-xdata-pcie.rst:20: WARNING: Unexpected 
> > > > indentation.
> > > > Documentation/misc-devices/dw-xdata-pcie.rst:24: WARNING: Unexpected 
> > > > indentation.
> > > > Documentation/misc-devices/dw-xdata-pcie.rst:25: WARNING: Block quote 
> > > > ends without a blank line; unexpected unindent.
> > > > Documentation/misc-devices/dw-xdata-pcie.rst:30: WARNING: Unexpected 
> > > > indentation.
> > > > Documentation/misc-devices/dw-xdata-pcie.rst:34: WARNING: Unexpected 
> > > > indentation.
> > > > Documentation/misc-devices/dw-xdata-pcie.rst:35: WARNING: Block quote 
> > > > ends without a blank line; unexpected unindent.
> > > > Documentation/misc-devices/dw-xdata-pcie.rst:40: WARNING: Unexpected 
> > > > indentation.
> > > > 
> > > > Introduced by commit
> > > > 
> > > >   e1181b5bbc3c ("Documentation: misc-devices: Add Documentation for 
> > > > dw-xdata-pcie driver")
> > > 
> > > Gustavo, can you send a follow-on patch to fix this up?
> > 
> > Yes, I have already made a fix for it.
> > My apologies for my ignorance on this matter, there is some way to check 
> > if my fixes are okay through some script or other way as Stephen has 
> > done?
> 
> Yes, run 'make htmldocs' in the kernel tree with your change applied and
> see if the warnings go away.

Done. I submitted now the v11 with the fixes.

-Gustavo
> 
> thanks,
> 
> greg k-h




Re: linux-next: build warning after merge of the char-misc tree

2021-04-06 Thread Greg KH
On Tue, Apr 06, 2021 at 02:13:53PM +, Gustavo Pimentel wrote:
> On Tue, Apr 6, 2021 at 15:7:23, Greg KH  wrote:
> 
> > On Tue, Apr 06, 2021 at 09:44:41PM +1000, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > After merging the char-misc tree, today's linux-next build (htmldocs)
> > > produced this warning:
> > > 
> > > Documentation/misc-devices/dw-xdata-pcie.rst:20: WARNING: Unexpected 
> > > indentation.
> > > Documentation/misc-devices/dw-xdata-pcie.rst:24: WARNING: Unexpected 
> > > indentation.
> > > Documentation/misc-devices/dw-xdata-pcie.rst:25: WARNING: Block quote 
> > > ends without a blank line; unexpected unindent.
> > > Documentation/misc-devices/dw-xdata-pcie.rst:30: WARNING: Unexpected 
> > > indentation.
> > > Documentation/misc-devices/dw-xdata-pcie.rst:34: WARNING: Unexpected 
> > > indentation.
> > > Documentation/misc-devices/dw-xdata-pcie.rst:35: WARNING: Block quote 
> > > ends without a blank line; unexpected unindent.
> > > Documentation/misc-devices/dw-xdata-pcie.rst:40: WARNING: Unexpected 
> > > indentation.
> > > 
> > > Introduced by commit
> > > 
> > >   e1181b5bbc3c ("Documentation: misc-devices: Add Documentation for 
> > > dw-xdata-pcie driver")
> > 
> > Gustavo, can you send a follow-on patch to fix this up?
> 
> Yes, I have already made a fix for it.
> My apologies for my ignorance on this matter, there is some way to check 
> if my fixes are okay through some script or other way as Stephen has 
> done?

Yes, run 'make htmldocs' in the kernel tree with your change applied and
see if the warnings go away.

thanks,

greg k-h


RE: linux-next: build warning after merge of the char-misc tree

2021-04-06 Thread Gustavo Pimentel
On Tue, Apr 6, 2021 at 15:7:23, Greg KH  wrote:

> On Tue, Apr 06, 2021 at 09:44:41PM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the char-misc tree, today's linux-next build (htmldocs)
> > produced this warning:
> > 
> > Documentation/misc-devices/dw-xdata-pcie.rst:20: WARNING: Unexpected 
> > indentation.
> > Documentation/misc-devices/dw-xdata-pcie.rst:24: WARNING: Unexpected 
> > indentation.
> > Documentation/misc-devices/dw-xdata-pcie.rst:25: WARNING: Block quote ends 
> > without a blank line; unexpected unindent.
> > Documentation/misc-devices/dw-xdata-pcie.rst:30: WARNING: Unexpected 
> > indentation.
> > Documentation/misc-devices/dw-xdata-pcie.rst:34: WARNING: Unexpected 
> > indentation.
> > Documentation/misc-devices/dw-xdata-pcie.rst:35: WARNING: Block quote ends 
> > without a blank line; unexpected unindent.
> > Documentation/misc-devices/dw-xdata-pcie.rst:40: WARNING: Unexpected 
> > indentation.
> > 
> > Introduced by commit
> > 
> >   e1181b5bbc3c ("Documentation: misc-devices: Add Documentation for 
> > dw-xdata-pcie driver")
> 
> Gustavo, can you send a follow-on patch to fix this up?

Yes, I have already made a fix for it.
My apologies for my ignorance on this matter, there is some way to check 
if my fixes are okay through some script or other way as Stephen has 
done?

-Gustavo

> 
> thanks,
> 
> greg k-h




Re: linux-next: build warning after merge of the char-misc tree

2021-04-06 Thread Greg KH
On Tue, Apr 06, 2021 at 09:44:41PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> Documentation/misc-devices/dw-xdata-pcie.rst:20: WARNING: Unexpected 
> indentation.
> Documentation/misc-devices/dw-xdata-pcie.rst:24: WARNING: Unexpected 
> indentation.
> Documentation/misc-devices/dw-xdata-pcie.rst:25: WARNING: Block quote ends 
> without a blank line; unexpected unindent.
> Documentation/misc-devices/dw-xdata-pcie.rst:30: WARNING: Unexpected 
> indentation.
> Documentation/misc-devices/dw-xdata-pcie.rst:34: WARNING: Unexpected 
> indentation.
> Documentation/misc-devices/dw-xdata-pcie.rst:35: WARNING: Block quote ends 
> without a blank line; unexpected unindent.
> Documentation/misc-devices/dw-xdata-pcie.rst:40: WARNING: Unexpected 
> indentation.
> 
> Introduced by commit
> 
>   e1181b5bbc3c ("Documentation: misc-devices: Add Documentation for 
> dw-xdata-pcie driver")

Gustavo, can you send a follow-on patch to fix this up?

thanks,

greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2021-04-06 Thread Stephen Rothwell
Hi all,

On Tue, 6 Apr 2021 21:44:41 +1000 Stephen Rothwell  
wrote:
>
> After merging the char-misc tree, today's linux-next build (htmldocs)
> produced this warning:
> 
> Documentation/misc-devices/dw-xdata-pcie.rst:20: WARNING: Unexpected 
> indentation.
> Documentation/misc-devices/dw-xdata-pcie.rst:24: WARNING: Unexpected 
> indentation.
> Documentation/misc-devices/dw-xdata-pcie.rst:25: WARNING: Block quote ends 
> without a blank line; unexpected unindent.
> Documentation/misc-devices/dw-xdata-pcie.rst:30: WARNING: Unexpected 
> indentation.
> Documentation/misc-devices/dw-xdata-pcie.rst:34: WARNING: Unexpected 
> indentation.
> Documentation/misc-devices/dw-xdata-pcie.rst:35: WARNING: Block quote ends 
> without a blank line; unexpected unindent.
> Documentation/misc-devices/dw-xdata-pcie.rst:40: WARNING: Unexpected 
> indentation.
> 
> Introduced by commit
> 
>   e1181b5bbc3c ("Documentation: misc-devices: Add Documentation for 
> dw-xdata-pcie driver")

Also:

Documentation/misc-devices/dw-xdata-pcie.rst: WARNING: document isn't included 
in any toctree

-- 
Cheers,
Stephen Rothwell


pgpppywo1QHaV.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the char-misc tree

2021-04-06 Thread Stephen Rothwell
Hi all,

After merging the char-misc tree, today's linux-next build (htmldocs)
produced this warning:

Documentation/misc-devices/dw-xdata-pcie.rst:20: WARNING: Unexpected 
indentation.
Documentation/misc-devices/dw-xdata-pcie.rst:24: WARNING: Unexpected 
indentation.
Documentation/misc-devices/dw-xdata-pcie.rst:25: WARNING: Block quote ends 
without a blank line; unexpected unindent.
Documentation/misc-devices/dw-xdata-pcie.rst:30: WARNING: Unexpected 
indentation.
Documentation/misc-devices/dw-xdata-pcie.rst:34: WARNING: Unexpected 
indentation.
Documentation/misc-devices/dw-xdata-pcie.rst:35: WARNING: Block quote ends 
without a blank line; unexpected unindent.
Documentation/misc-devices/dw-xdata-pcie.rst:40: WARNING: Unexpected 
indentation.

Introduced by commit

  e1181b5bbc3c ("Documentation: misc-devices: Add Documentation for 
dw-xdata-pcie driver")

-- 
Cheers,
Stephen Rothwell


pgpd8qr76QUAO.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the char-misc tree

2021-01-28 Thread Stephen Rothwell
Hi all,

After merging the char-misc tree, today's linux-next build (htmldocs)
produced this warning:

Documentation/driver-api/index.rst:14: WARNING: toctree contains reference to 
nonexisting document 'driver-api/pti_intel_mid'

Introduced by commit

  8ba59e9dee31 ("misc: pti: Remove driver for deprecated platform")

-- 
Cheers,
Stephen Rothwell


pgp6NGnW_iehq.pgp
Description: OpenPGP digital signature


RE: linux-next: build warning after merge of the char-misc tree

2020-05-01 Thread Rajan Vaja
Hi Greg,

Thanks for notifying. I have submitted "[PATCH char-misc-next] crypto: xilinx: 
Handle AES PM API return status" to fix warning.

Thanks,
Rajan

> -Original Message-
> From: Greg KH 
> Sent: Friday, May 1, 2020 12:25 PM
> To: Stephen Rothwell ; Rajan Vaja
> ; Jolly Shah 
> Cc: Arnd Bergmann ; Linux Next Mailing List  n...@vger.kernel.org>; Linux Kernel Mailing List  ker...@vger.kernel.org>
> Subject: Re: linux-next: build warning after merge of the char-misc tree
> 
> CAUTION: This message has originated from an External Source. Please use
> proper judgment and caution when opening attachments, clicking links, or
> responding to this email.
> 
> 
> On Fri, May 01, 2020 at 04:28:06PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the char-misc tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> >
> > drivers/crypto/xilinx/zynqmp-aes-gcm.c: In function
> 'zynqmp_handle_aes_req':
> > drivers/crypto/xilinx/zynqmp-aes-gcm.c:137:5: warning: 'status' may be
> used uninitialized in this function [-Wmaybe-uninitialized]
> >   137 |  if (status) {
> >   | ^
> > drivers/crypto/xilinx/zynqmp-aes-gcm.c:87:15: note: 'status' was declared
> here
> >87 |  unsigned int status;
> >   |   ^~
> >
> > Introduced by commit
> >
> >   bc86f9c54616 ("firmware: xilinx: Remove eemi ops for aes engine")
> 
> Rajan, can you send me a patch to fix this up please?
> 
> thanks,
> 
> greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2020-05-01 Thread Greg KH
On Fri, May 01, 2020 at 04:28:06PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/crypto/xilinx/zynqmp-aes-gcm.c: In function 'zynqmp_handle_aes_req':
> drivers/crypto/xilinx/zynqmp-aes-gcm.c:137:5: warning: 'status' may be used 
> uninitialized in this function [-Wmaybe-uninitialized]
>   137 |  if (status) {
>   | ^
> drivers/crypto/xilinx/zynqmp-aes-gcm.c:87:15: note: 'status' was declared here
>87 |  unsigned int status;
>   |   ^~
> 
> Introduced by commit
> 
>   bc86f9c54616 ("firmware: xilinx: Remove eemi ops for aes engine")

Rajan, can you send me a patch to fix this up please?

thanks,

greg k-h


linux-next: build warning after merge of the char-misc tree

2020-05-01 Thread Stephen Rothwell
Hi all,

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

drivers/crypto/xilinx/zynqmp-aes-gcm.c: In function 'zynqmp_handle_aes_req':
drivers/crypto/xilinx/zynqmp-aes-gcm.c:137:5: warning: 'status' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
  137 |  if (status) {
  | ^
drivers/crypto/xilinx/zynqmp-aes-gcm.c:87:15: note: 'status' was declared here
   87 |  unsigned int status;
  |   ^~

Introduced by commit

  bc86f9c54616 ("firmware: xilinx: Remove eemi ops for aes engine")

-- 
Cheers,
Stephen Rothwell


pgpnTGgWg1gEj.pgp
Description: OpenPGP digital signature


Re: linux-next: build warning after merge of the char-misc tree

2019-04-26 Thread Patrick Venture
On Fri, Apr 26, 2019 at 7:30 AM Patrick Venture  wrote:
>
> On Thu, Apr 25, 2019 at 11:25 PM Greg KH  wrote:
> >
> > On Fri, Apr 26, 2019 at 03:56:53PM +1000, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > After merging the char-misc tree, today's linux-next build (x86_64
> > > allmodconfig) produced this warning:
> > >
> > > drivers/misc/aspeed-p2a-ctrl.c: In function 'aspeed_p2a_mmap':
> > > drivers/misc/aspeed-p2a-ctrl.c:110:2: warning: ISO C90 forbids mixed 
> > > declarations and code [-Wdeclaration-after-statement]
> > >   pgprot_t prot = vma->vm_page_prot;
> > >   ^~~~
> > >
> > > Introduced by commit
> > >
> > >   01c60dcea9f7 ("drivers/misc: Add Aspeed P2A control driver")
> >
> > Patrick, I thought you fixed all of these already?  Can you send a patch
> > again?
>
> I fixed the ones caught by the robot.  I'll have to switch up my build
> environment a bit to fault on warnings for the kernel, not sure why it
> isn't --

Verified the warnings being ignored isn't a local configuration issue,
but the way OpenBMC is configured.  Verified the warning via normal
kernel compilation and fixed the issue.  Reran and found no other
issues for that drivers.  Submitted patch for review.

>
> >
> > Can you also make the driver so it can build with CONFIG_COMPILE_TEST
> > enabled so that others can find your problems earlier in the review
> > process?

Verified the driver builds and produces no warnings.

Thanks,
Patrick

>
> Roger that.
>
> >
> > thanks,
> >
> > greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2019-04-26 Thread Patrick Venture
On Thu, Apr 25, 2019 at 11:25 PM Greg KH  wrote:
>
> On Fri, Apr 26, 2019 at 03:56:53PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the char-misc tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> >
> > drivers/misc/aspeed-p2a-ctrl.c: In function 'aspeed_p2a_mmap':
> > drivers/misc/aspeed-p2a-ctrl.c:110:2: warning: ISO C90 forbids mixed 
> > declarations and code [-Wdeclaration-after-statement]
> >   pgprot_t prot = vma->vm_page_prot;
> >   ^~~~
> >
> > Introduced by commit
> >
> >   01c60dcea9f7 ("drivers/misc: Add Aspeed P2A control driver")
>
> Patrick, I thought you fixed all of these already?  Can you send a patch
> again?

I fixed the ones caught by the robot.  I'll have to switch up my build
environment a bit to fault on warnings for the kernel, not sure why it
isn't --

>
> Can you also make the driver so it can build with CONFIG_COMPILE_TEST
> enabled so that others can find your problems earlier in the review
> process?

Roger that.

>
> thanks,
>
> greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2019-04-26 Thread Greg KH
On Fri, Apr 26, 2019 at 03:56:53PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/misc/aspeed-p2a-ctrl.c: In function 'aspeed_p2a_mmap':
> drivers/misc/aspeed-p2a-ctrl.c:110:2: warning: ISO C90 forbids mixed 
> declarations and code [-Wdeclaration-after-statement]
>   pgprot_t prot = vma->vm_page_prot;
>   ^~~~
> 
> Introduced by commit
> 
>   01c60dcea9f7 ("drivers/misc: Add Aspeed P2A control driver")

Patrick, I thought you fixed all of these already?  Can you send a patch
again?

Can you also make the driver so it can build with CONFIG_COMPILE_TEST
enabled so that others can find your problems earlier in the review
process?

thanks,

greg k-h


linux-next: build warning after merge of the char-misc tree

2019-04-25 Thread Stephen Rothwell
Hi all,

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

drivers/misc/aspeed-p2a-ctrl.c: In function 'aspeed_p2a_mmap':
drivers/misc/aspeed-p2a-ctrl.c:110:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
  pgprot_t prot = vma->vm_page_prot;
  ^~~~

Introduced by commit

  01c60dcea9f7 ("drivers/misc: Add Aspeed P2A control driver")

-- 
Cheers,
Stephen Rothwell


pgpNvM_dCf8Uq.pgp
Description: OpenPGP digital signature


Re: linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Bartosz Golaszewski
wt., 2 paź 2018 o 11:56 Srinivas Kandagatla
 napisał(a):
>
>
>
> On 02/10/18 10:49, Bartosz Golaszewski wrote:
> > this looks like a false positive - this routine is used in
> > ./drivers/nvmem/core.c at line 943 in this revision.
> >
> Note that the caller is under
>   #if IS_ENABLED(CONFIG_OF)
> so this warning!
>
>
> --srini
>
> > Best regards,

Right. Let me fix that then.

Thanks!
Bartosz


Re: linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Bartosz Golaszewski
wt., 2 paź 2018 o 11:56 Srinivas Kandagatla
 napisał(a):
>
>
>
> On 02/10/18 10:49, Bartosz Golaszewski wrote:
> > this looks like a false positive - this routine is used in
> > ./drivers/nvmem/core.c at line 943 in this revision.
> >
> Note that the caller is under
>   #if IS_ENABLED(CONFIG_OF)
> so this warning!
>
>
> --srini
>
> > Best regards,

Right. Let me fix that then.

Thanks!
Bartosz


Re: linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Srinivas Kandagatla




On 02/10/18 10:49, Bartosz Golaszewski wrote:

this looks like a false positive - this routine is used in
./drivers/nvmem/core.c at line 943 in this revision.


Note that the caller is under
 #if IS_ENABLED(CONFIG_OF)
so this warning!


--srini


Best regards,


Re: linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Srinivas Kandagatla




On 02/10/18 10:49, Bartosz Golaszewski wrote:

this looks like a false positive - this routine is used in
./drivers/nvmem/core.c at line 943 in this revision.


Note that the caller is under
 #if IS_ENABLED(CONFIG_OF)
so this warning!


--srini


Best regards,


Re: linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Bartosz Golaszewski
wt., 2 paź 2018 o 11:12 Stephen Rothwell  napisał(a):
>
> Hi all,
>
> After merging the char-misc tree, today's linux-next build (i386
> defconfig) produced this warning:
>
> drivers/nvmem/core.c:496:1: warning: 'nvmem_find_cell_by_index' defined but 
> not used [-Wunused-function]
>  nvmem_find_cell_by_index(struct nvmem_device *nvmem, int index)
>  ^~~~
>
> Introduced by commit
>
>   e888d445ac33 ("nvmem: resolve cells from DT at registration time")
>
> --
> Cheers,
> Stephen Rothwell

Hi Stephen,

this looks like a false positive - this routine is used in
./drivers/nvmem/core.c at line 943 in this revision.

Best regards,
Bartosz Golaszewski


Re: linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Bartosz Golaszewski
wt., 2 paź 2018 o 11:12 Stephen Rothwell  napisał(a):
>
> Hi all,
>
> After merging the char-misc tree, today's linux-next build (i386
> defconfig) produced this warning:
>
> drivers/nvmem/core.c:496:1: warning: 'nvmem_find_cell_by_index' defined but 
> not used [-Wunused-function]
>  nvmem_find_cell_by_index(struct nvmem_device *nvmem, int index)
>  ^~~~
>
> Introduced by commit
>
>   e888d445ac33 ("nvmem: resolve cells from DT at registration time")
>
> --
> Cheers,
> Stephen Rothwell

Hi Stephen,

this looks like a false positive - this routine is used in
./drivers/nvmem/core.c at line 943 in this revision.

Best regards,
Bartosz Golaszewski


linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Stephen Rothwell
Hi all,

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

drivers/nvmem/core.c:496:1: warning: 'nvmem_find_cell_by_index' defined but not 
used [-Wunused-function]
 nvmem_find_cell_by_index(struct nvmem_device *nvmem, int index)
 ^~~~

Introduced by commit

  e888d445ac33 ("nvmem: resolve cells from DT at registration time")

-- 
Cheers,
Stephen Rothwell


pgpTQ3ecCBwBZ.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Stephen Rothwell
Hi all,

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

drivers/nvmem/core.c:496:1: warning: 'nvmem_find_cell_by_index' defined but not 
used [-Wunused-function]
 nvmem_find_cell_by_index(struct nvmem_device *nvmem, int index)
 ^~~~

Introduced by commit

  e888d445ac33 ("nvmem: resolve cells from DT at registration time")

-- 
Cheers,
Stephen Rothwell


pgpTQ3ecCBwBZ.pgp
Description: OpenPGP digital signature


Re: linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Bartosz Golaszewski
wt., 2 paź 2018 o 07:31 Stephen Rothwell  napisał(a):
>
> Hi all,
>
> After merging the char-misc tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/nvmem/lpc18xx_eeprom.c: In function 'lpc18xx_eeprom_remove':
> drivers/nvmem/lpc18xx_eeprom.c:258:6: warning: unused variable 'ret' 
> [-Wunused-variable]
>   int ret;
>   ^~~
>
> Introduced by commit
>
>   226014d13fa5 ("nvmem: lpc18xx_eeprom: use devm_nvmem_register()")
>
> --
> Cheers,
> Stephen Rothwell

Hi Stephen,

I'll send a follow-up to fix this.

Thanks,
Bartosz


Re: linux-next: build warning after merge of the char-misc tree

2018-10-02 Thread Bartosz Golaszewski
wt., 2 paź 2018 o 07:31 Stephen Rothwell  napisał(a):
>
> Hi all,
>
> After merging the char-misc tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/nvmem/lpc18xx_eeprom.c: In function 'lpc18xx_eeprom_remove':
> drivers/nvmem/lpc18xx_eeprom.c:258:6: warning: unused variable 'ret' 
> [-Wunused-variable]
>   int ret;
>   ^~~
>
> Introduced by commit
>
>   226014d13fa5 ("nvmem: lpc18xx_eeprom: use devm_nvmem_register()")
>
> --
> Cheers,
> Stephen Rothwell

Hi Stephen,

I'll send a follow-up to fix this.

Thanks,
Bartosz


linux-next: build warning after merge of the char-misc tree

2018-10-01 Thread Stephen Rothwell
Hi all,

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

drivers/nvmem/lpc18xx_eeprom.c: In function 'lpc18xx_eeprom_remove':
drivers/nvmem/lpc18xx_eeprom.c:258:6: warning: unused variable 'ret' 
[-Wunused-variable]
  int ret;
  ^~~

Introduced by commit

  226014d13fa5 ("nvmem: lpc18xx_eeprom: use devm_nvmem_register()")

-- 
Cheers,
Stephen Rothwell


pgpbjYpYRqr0L.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the char-misc tree

2018-10-01 Thread Stephen Rothwell
Hi all,

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

drivers/nvmem/lpc18xx_eeprom.c: In function 'lpc18xx_eeprom_remove':
drivers/nvmem/lpc18xx_eeprom.c:258:6: warning: unused variable 'ret' 
[-Wunused-variable]
  int ret;
  ^~~

Introduced by commit

  226014d13fa5 ("nvmem: lpc18xx_eeprom: use devm_nvmem_register()")

-- 
Cheers,
Stephen Rothwell


pgpbjYpYRqr0L.pgp
Description: OpenPGP digital signature


Re: linux-next: build warning after merge of the char-misc tree

2017-12-12 Thread Greg KH
On Tue, Dec 12, 2017 at 02:39:10PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, today's linux-next build
> (x86_64_allmodconfig) produced this warning:
> 
> drivers/misc/mic/vop/vop_vringh.c: In function 'vop_ioctl':
> drivers/misc/mic/vop/vop_vringh.c:1001:1: warning: label 'done' defined but 
> not used [-Wunused-label]
>  done:
>  ^
> 
> Introduced by commit
> 
>   30b7a2c19e29 ("misc: mic: Use memdup_user() as a cleanup")

Thanks, Colin sent a patch for this, will queue it up later today.

greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2017-12-12 Thread Greg KH
On Tue, Dec 12, 2017 at 02:39:10PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, today's linux-next build
> (x86_64_allmodconfig) produced this warning:
> 
> drivers/misc/mic/vop/vop_vringh.c: In function 'vop_ioctl':
> drivers/misc/mic/vop/vop_vringh.c:1001:1: warning: label 'done' defined but 
> not used [-Wunused-label]
>  done:
>  ^
> 
> Introduced by commit
> 
>   30b7a2c19e29 ("misc: mic: Use memdup_user() as a cleanup")

Thanks, Colin sent a patch for this, will queue it up later today.

greg k-h


linux-next: build warning after merge of the char-misc tree

2017-12-11 Thread Stephen Rothwell
Hi all,

After merging the char-misc tree, today's linux-next build
(x86_64_allmodconfig) produced this warning:

drivers/misc/mic/vop/vop_vringh.c: In function 'vop_ioctl':
drivers/misc/mic/vop/vop_vringh.c:1001:1: warning: label 'done' defined but not 
used [-Wunused-label]
 done:
 ^

Introduced by commit

  30b7a2c19e29 ("misc: mic: Use memdup_user() as a cleanup")

-- 
Cheers,
Stephen Rothwell


linux-next: build warning after merge of the char-misc tree

2017-12-11 Thread Stephen Rothwell
Hi all,

After merging the char-misc tree, today's linux-next build
(x86_64_allmodconfig) produced this warning:

drivers/misc/mic/vop/vop_vringh.c: In function 'vop_ioctl':
drivers/misc/mic/vop/vop_vringh.c:1001:1: warning: label 'done' defined but not 
used [-Wunused-label]
 done:
 ^

Introduced by commit

  30b7a2c19e29 ("misc: mic: Use memdup_user() as a cleanup")

-- 
Cheers,
Stephen Rothwell


RE: linux-next: build warning after merge of the char-misc tree

2017-07-20 Thread KY Srinivasan


> -Original Message-
> From: Greg KH [mailto:g...@kroah.com]
> Sent: Wednesday, July 19, 2017 10:13 PM
> To: Stephen Rothwell <s...@canb.auug.org.au>
> Cc: Arnd Bergmann <a...@arndb.de>; Linux-Next Mailing List  n...@vger.kernel.org>; Linux Kernel Mailing List  ker...@vger.kernel.org>; Vitaly Kuznetsov <vkuzn...@redhat.com>; KY
> Srinivasan <k...@microsoft.com>; Andy Shevchenko
> <andy.shevche...@gmail.com>
> Subject: Re: linux-next: build warning after merge of the char-misc tree
> 
> On Thu, Jul 20, 2017 at 02:12:03PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the char-misc tree, yesterday's linux-next build (i386
> > defconfig) produced this warning:
> >
> > In file included from
> /home/sfr/next/next/arch/x86/entry/vdso/vma.c:25:0:
> > /home/sfr/next/next/arch/x86/include/asm/mshyperv.h:181:15: warning:
> return type defaults to 'int' [-Wreturn-type]
> >  static inline hyperv_cleanup(void) {}
> >^
> >
> > Introduced by commit
> >
> >   2e252fbf777d ("x86/hyper-v: include hyperv/ only when CONFIG_HYPERV
> is set")
> 
> Ugh, KY, can you send me a fix for this?

I just saw that you reverted the patch. We will fix this up and resend.

Thanks,

K. Y
> 
> All of these gcc-7 warnings are keeping me from seeing the "real"
> problems now :(
> 
> thanks,
> 
> greg k-h


RE: linux-next: build warning after merge of the char-misc tree

2017-07-20 Thread KY Srinivasan


> -Original Message-
> From: Greg KH [mailto:g...@kroah.com]
> Sent: Wednesday, July 19, 2017 10:13 PM
> To: Stephen Rothwell 
> Cc: Arnd Bergmann ; Linux-Next Mailing List  n...@vger.kernel.org>; Linux Kernel Mailing List  ker...@vger.kernel.org>; Vitaly Kuznetsov ; KY
> Srinivasan ; Andy Shevchenko
> 
> Subject: Re: linux-next: build warning after merge of the char-misc tree
> 
> On Thu, Jul 20, 2017 at 02:12:03PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the char-misc tree, yesterday's linux-next build (i386
> > defconfig) produced this warning:
> >
> > In file included from
> /home/sfr/next/next/arch/x86/entry/vdso/vma.c:25:0:
> > /home/sfr/next/next/arch/x86/include/asm/mshyperv.h:181:15: warning:
> return type defaults to 'int' [-Wreturn-type]
> >  static inline hyperv_cleanup(void) {}
> >^
> >
> > Introduced by commit
> >
> >   2e252fbf777d ("x86/hyper-v: include hyperv/ only when CONFIG_HYPERV
> is set")
> 
> Ugh, KY, can you send me a fix for this?

I just saw that you reverted the patch. We will fix this up and resend.

Thanks,

K. Y
> 
> All of these gcc-7 warnings are keeping me from seeing the "real"
> problems now :(
> 
> thanks,
> 
> greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2017-07-20 Thread Greg KH
On Thu, Jul 20, 2017 at 02:12:03PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, yesterday's linux-next build (i386
> defconfig) produced this warning:
> 
> In file included from /home/sfr/next/next/arch/x86/entry/vdso/vma.c:25:0:
> /home/sfr/next/next/arch/x86/include/asm/mshyperv.h:181:15: warning: return 
> type defaults to 'int' [-Wreturn-type]  
>  static inline hyperv_cleanup(void) {}
>^
> 
> Introduced by commit
> 
>   2e252fbf777d ("x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set")

Now reverted from my tree, thanks.

greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2017-07-20 Thread Greg KH
On Thu, Jul 20, 2017 at 02:12:03PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, yesterday's linux-next build (i386
> defconfig) produced this warning:
> 
> In file included from /home/sfr/next/next/arch/x86/entry/vdso/vma.c:25:0:
> /home/sfr/next/next/arch/x86/include/asm/mshyperv.h:181:15: warning: return 
> type defaults to 'int' [-Wreturn-type]  
>  static inline hyperv_cleanup(void) {}
>^
> 
> Introduced by commit
> 
>   2e252fbf777d ("x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set")

Now reverted from my tree, thanks.

greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2017-07-19 Thread Greg KH
On Thu, Jul 20, 2017 at 02:12:03PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, yesterday's linux-next build (i386
> defconfig) produced this warning:
> 
> In file included from /home/sfr/next/next/arch/x86/entry/vdso/vma.c:25:0:
> /home/sfr/next/next/arch/x86/include/asm/mshyperv.h:181:15: warning: return 
> type defaults to 'int' [-Wreturn-type]  
>  static inline hyperv_cleanup(void) {}
>^
> 
> Introduced by commit
> 
>   2e252fbf777d ("x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set")

Ugh, KY, can you send me a fix for this?

All of these gcc-7 warnings are keeping me from seeing the "real"
problems now :(

thanks,

greg k-h


Re: linux-next: build warning after merge of the char-misc tree

2017-07-19 Thread Greg KH
On Thu, Jul 20, 2017 at 02:12:03PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, yesterday's linux-next build (i386
> defconfig) produced this warning:
> 
> In file included from /home/sfr/next/next/arch/x86/entry/vdso/vma.c:25:0:
> /home/sfr/next/next/arch/x86/include/asm/mshyperv.h:181:15: warning: return 
> type defaults to 'int' [-Wreturn-type]  
>  static inline hyperv_cleanup(void) {}
>^
> 
> Introduced by commit
> 
>   2e252fbf777d ("x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set")

Ugh, KY, can you send me a fix for this?

All of these gcc-7 warnings are keeping me from seeing the "real"
problems now :(

thanks,

greg k-h


linux-next: build warning after merge of the char-misc tree

2017-07-19 Thread Stephen Rothwell
Hi all,

After merging the char-misc tree, yesterday's linux-next build (i386
defconfig) produced this warning:

In file included from /home/sfr/next/next/arch/x86/entry/vdso/vma.c:25:0:
/home/sfr/next/next/arch/x86/include/asm/mshyperv.h:181:15: warning: return 
type defaults to 'int' [-Wreturn-type]  
 static inline hyperv_cleanup(void) {}
   ^

Introduced by commit

  2e252fbf777d ("x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set")

-- 
Cheers,
Stephen Rothwell


linux-next: build warning after merge of the char-misc tree

2017-07-19 Thread Stephen Rothwell
Hi all,

After merging the char-misc tree, yesterday's linux-next build (i386
defconfig) produced this warning:

In file included from /home/sfr/next/next/arch/x86/entry/vdso/vma.c:25:0:
/home/sfr/next/next/arch/x86/include/asm/mshyperv.h:181:15: warning: return 
type defaults to 'int' [-Wreturn-type]  
 static inline hyperv_cleanup(void) {}
   ^

Introduced by commit

  2e252fbf777d ("x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set")

-- 
Cheers,
Stephen Rothwell


Re: linux-next: build warning after merge of the char-misc tree

2017-03-27 Thread Masahiro Yamada
Hi Stephen,


2017-03-28 12:31 GMT+09:00 Stephen Rothwell :
> Hi all,
>
> After merging the char-misc tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> ./usr/include/linux/aspeed-lpc-ctrl.h:44: found __[us]{8,16,32,64} type 
> without #include 
>
> Introduced by commit
>
>   6c4e97678501 ("drivers/misc: Add Aspeed LPC control driver")
>
> Probably exposed by commit
>
>   65017bab8a9e ("uapi: export all headers under uapi directories")
>
> from the kbuild tree (since this header had not been explicitly exported).


I think we need to do a similar fixup as the following commit:


commit a9e9c248a03abae123b301804d367ad278dad3a8
Author: Nicolas Dichtel 
Date:   Mon Mar 27 14:20:11 2017 +0200

uapi: includes linux/types.h before exporting files


-- 
Best Regards
Masahiro Yamada


Re: linux-next: build warning after merge of the char-misc tree

2017-03-27 Thread Masahiro Yamada
Hi Stephen,


2017-03-28 12:31 GMT+09:00 Stephen Rothwell :
> Hi all,
>
> After merging the char-misc tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> ./usr/include/linux/aspeed-lpc-ctrl.h:44: found __[us]{8,16,32,64} type 
> without #include 
>
> Introduced by commit
>
>   6c4e97678501 ("drivers/misc: Add Aspeed LPC control driver")
>
> Probably exposed by commit
>
>   65017bab8a9e ("uapi: export all headers under uapi directories")
>
> from the kbuild tree (since this header had not been explicitly exported).


I think we need to do a similar fixup as the following commit:


commit a9e9c248a03abae123b301804d367ad278dad3a8
Author: Nicolas Dichtel 
Date:   Mon Mar 27 14:20:11 2017 +0200

uapi: includes linux/types.h before exporting files


-- 
Best Regards
Masahiro Yamada


linux-next: build warning after merge of the char-misc tree

2017-03-27 Thread Stephen Rothwell
Hi all,

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

./usr/include/linux/aspeed-lpc-ctrl.h:44: found __[us]{8,16,32,64} type without 
#include 

Introduced by commit

  6c4e97678501 ("drivers/misc: Add Aspeed LPC control driver")

Probably exposed by commit

  65017bab8a9e ("uapi: export all headers under uapi directories")

from the kbuild tree (since this header had not been explicitly exported).

-- 
Cheers,
Stephen Rothwell


linux-next: build warning after merge of the char-misc tree

2017-03-27 Thread Stephen Rothwell
Hi all,

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

./usr/include/linux/aspeed-lpc-ctrl.h:44: found __[us]{8,16,32,64} type without 
#include 

Introduced by commit

  6c4e97678501 ("drivers/misc: Add Aspeed LPC control driver")

Probably exposed by commit

  65017bab8a9e ("uapi: export all headers under uapi directories")

from the kbuild tree (since this header had not been explicitly exported).

-- 
Cheers,
Stephen Rothwell


Re: linux-next: build warning after merge of the char-misc tree

2015-04-03 Thread Greg KH
On Tue, Mar 31, 2015 at 09:35:45PM +0200, Fabian Frederick wrote:
> 
> 
> > On 27 March 2015 at 08:48 Stephen Rothwell  wrote:
> >
> >
> > Hi all,
> >
> > After merging the char-misc tree, today's linux-next build (powerpc
> > allyesconfig) produced this warning:
> >
> > In file included from include/linux/module.h:17:0,
> >                  from drivers/uio/uio_pdrv_genirq.c:21:
> > include/linux/moduleparam.h:326:22: warning: initialization discards 'const'
> > qualifier from pointer target type
> >   static const struct kparam_string __param_string_##name  \
> >                       ^
> > drivers/uio/uio_pdrv_genirq.c:260:1: note: in expansion of macro
> > 'module_param_string'
> >  module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
> >  ^
> >
> > Introduced by commit 4d8beff2ae07 ("uio: constify of_device_id array").
> 
> Hi Stephen,
> 
> Absolutely, my patch is wrong ; comment below explains struct is filled
> afterwards.Sorry.
> Greg, should I send you a revert or maybe we could standardize that driver ? 
> (it
> seems it's the only one to work that way).
> 
> static const struct of_device_id uio_of_genirq_match[] = {
>         { /* This is filled with module_parm */ },
>         { /* Sentinel */ },
> };

A revert would be great, and then work to fix it "correctly" so we can
make it constant would be wonderful.  But I don't know how you would do
that at first glance.

I'll just go revert the patch now, thanks.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2015-04-03 Thread Greg KH
On Tue, Mar 31, 2015 at 09:35:45PM +0200, Fabian Frederick wrote:
 
 
  On 27 March 2015 at 08:48 Stephen Rothwell s...@canb.auug.org.au wrote:
 
 
  Hi all,
 
  After merging the char-misc tree, today's linux-next build (powerpc
  allyesconfig) produced this warning:
 
  In file included from include/linux/module.h:17:0,
                   from drivers/uio/uio_pdrv_genirq.c:21:
  include/linux/moduleparam.h:326:22: warning: initialization discards 'const'
  qualifier from pointer target type
    static const struct kparam_string __param_string_##name  \
                        ^
  drivers/uio/uio_pdrv_genirq.c:260:1: note: in expansion of macro
  'module_param_string'
   module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
   ^
 
  Introduced by commit 4d8beff2ae07 (uio: constify of_device_id array).
 
 Hi Stephen,
 
 Absolutely, my patch is wrong ; comment below explains struct is filled
 afterwards.Sorry.
 Greg, should I send you a revert or maybe we could standardize that driver ? 
 (it
 seems it's the only one to work that way).
 
 static const struct of_device_id uio_of_genirq_match[] = {
         { /* This is filled with module_parm */ },
         { /* Sentinel */ },
 };

A revert would be great, and then work to fix it correctly so we can
make it constant would be wonderful.  But I don't know how you would do
that at first glance.

I'll just go revert the patch now, thanks.

thanks,

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2015-03-31 Thread Fabian Frederick


> On 27 March 2015 at 08:48 Stephen Rothwell  wrote:
>
>
> Hi all,
>
> After merging the char-misc tree, today's linux-next build (powerpc
> allyesconfig) produced this warning:
>
> In file included from include/linux/module.h:17:0,
>                  from drivers/uio/uio_pdrv_genirq.c:21:
> include/linux/moduleparam.h:326:22: warning: initialization discards 'const'
> qualifier from pointer target type
>   static const struct kparam_string __param_string_##name  \
>                       ^
> drivers/uio/uio_pdrv_genirq.c:260:1: note: in expansion of macro
> 'module_param_string'
>  module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
>  ^
>
> Introduced by commit 4d8beff2ae07 ("uio: constify of_device_id array").

Hi Stephen,

Absolutely, my patch is wrong ; comment below explains struct is filled
afterwards.Sorry.
Greg, should I send you a revert or maybe we could standardize that driver ? (it
seems it's the only one to work that way).

static const struct of_device_id uio_of_genirq_match[] = {
        { /* This is filled with module_parm */ },
        { /* Sentinel */ },
};

Regards,
Fabian

> --
> Cheers,
> Stephen Rothwell                    s...@canb.auug.org.au
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2015-03-31 Thread Fabian Frederick


 On 27 March 2015 at 08:48 Stephen Rothwell s...@canb.auug.org.au wrote:


 Hi all,

 After merging the char-misc tree, today's linux-next build (powerpc
 allyesconfig) produced this warning:

 In file included from include/linux/module.h:17:0,
                  from drivers/uio/uio_pdrv_genirq.c:21:
 include/linux/moduleparam.h:326:22: warning: initialization discards 'const'
 qualifier from pointer target type
   static const struct kparam_string __param_string_##name  \
                       ^
 drivers/uio/uio_pdrv_genirq.c:260:1: note: in expansion of macro
 'module_param_string'
  module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
  ^

 Introduced by commit 4d8beff2ae07 (uio: constify of_device_id array).

Hi Stephen,

Absolutely, my patch is wrong ; comment below explains struct is filled
afterwards.Sorry.
Greg, should I send you a revert or maybe we could standardize that driver ? (it
seems it's the only one to work that way).

static const struct of_device_id uio_of_genirq_match[] = {
        { /* This is filled with module_parm */ },
        { /* Sentinel */ },
};

Regards,
Fabian

 --
 Cheers,
 Stephen Rothwell                    s...@canb.auug.org.au
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: build warning after merge of the char-misc tree

2015-03-27 Thread Stephen Rothwell
Hi all,

After merging the char-misc tree, today's linux-next build (powerpc
allyesconfig) produced this warning:

In file included from include/linux/module.h:17:0,
 from drivers/uio/uio_pdrv_genirq.c:21:
include/linux/moduleparam.h:326:22: warning: initialization discards 'const' 
qualifier from pointer target type
  static const struct kparam_string __param_string_##name  \
  ^
drivers/uio/uio_pdrv_genirq.c:260:1: note: in expansion of macro 
'module_param_string'
 module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
 ^

Introduced by commit 4d8beff2ae07 ("uio: constify of_device_id array").
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpuPI0eYeR1F.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the char-misc tree

2015-03-27 Thread Stephen Rothwell
Hi all,

After merging the char-misc tree, today's linux-next build (powerpc
allyesconfig) produced this warning:

In file included from include/linux/module.h:17:0,
 from drivers/uio/uio_pdrv_genirq.c:21:
include/linux/moduleparam.h:326:22: warning: initialization discards 'const' 
qualifier from pointer target type
  static const struct kparam_string __param_string_##name  \
  ^
drivers/uio/uio_pdrv_genirq.c:260:1: note: in expansion of macro 
'module_param_string'
 module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
 ^

Introduced by commit 4d8beff2ae07 (uio: constify of_device_id array).
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpuPI0eYeR1F.pgp
Description: OpenPGP digital signature


Re: linux-next: build warning after merge of the char-misc tree

2013-03-01 Thread Sedat Dilek
On Fri, Mar 1, 2013 at 6:16 PM, Arnd Bergmann  wrote:
> On Friday 01 March 2013, Sedat Dilek wrote:
>> I have seen a lot of such failures when using the Freetz (a small
>> router project) build-system with gcc-4.7-x where "-Os" is default
>> optimization-level.
>>
>> Last, when I tried to integrate ltrace GIT snapshots into Freetz.
>> All these "build-errors" could be solved in changing ltrace code.
>> So, I would not talk about "false positives".
>
> But the point is that we should not be changing the source code to
> unnecessary initializations, because that may hide real bugs if the
> code is modified in a way that relies on a sane value of some
> variable. They are false positives if the code is actually correct
> and does not need to be changed.
>
> I actually have a newer version of my patch (see below) that uses
> the cc-disable-warning macro in order to avoid some of the
> side-effects of setting an unknown option on older gcc versions.
>
>> Furthermore, "-Wno-maybe-uninitialized" gcc-option is available
>> gcc-4-7+, so your patch is incomplete.
>
> O don't understand. The patch avoids the warnings when building
> with gcc-4.7 or higher with -Os.
>

If the ...$(call cc-disable-warning...) line is checking $compiler for
$feature_is-available than I have misunderstood it.

Looks good, thanks.

- Sedat -

> Arnd
>
>
> From d313219a2f2e0753b8e96105b7a944e1c22566ae Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann 
> Date: Fri, 15 Feb 2013 21:23:58 +0100
> Subject: [PATCH] Turn off -Wmaybe-uninitialized when building with -Os
>
> gcc-4.7 and higher add a lot of false positive warnings about
> potential uses of uninitialized warnings, but only when optimizing
> for size (-Os). This is the default when building allyesconfig,
> which turns on CONFIG_CC_OPTIMIZE_FOR_SIZE.
>
> In order to avoid getting a lot of patches that initialize such
> variables and accidentally hide real errors along the way, let's
> just turn off this warning on the respective gcc versions
> when building with size optimizations. The -Wmaybe-uninitialized
> option was introduced in the same gcc version (4.7) that is now
> causing the false positives, so there is no effect on older compilers.
>
> A side effect is that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE,
> we might now see /fewer/ warnings about possibly uninitialized
> warnings than with -O2, but that is still much better than seeing
> warnings known to be bogus.
>
> Signed-off-by: Arnd Bergmann 
>
> diff --git a/Makefile b/Makefile
> index 473beb1..f0ec9bc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -570,7 +570,7 @@ endif # $(dot-config)
>  all: vmlinux
>
>  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
> -KBUILD_CFLAGS  += -Os
> +KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
>  else
>  KBUILD_CFLAGS  += -O2
>  endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-03-01 Thread Arnd Bergmann
On Friday 01 March 2013, Sedat Dilek wrote:
> I have seen a lot of such failures when using the Freetz (a small
> router project) build-system with gcc-4.7-x where "-Os" is default
> optimization-level.
> 
> Last, when I tried to integrate ltrace GIT snapshots into Freetz.
> All these "build-errors" could be solved in changing ltrace code.
> So, I would not talk about "false positives".

But the point is that we should not be changing the source code to
unnecessary initializations, because that may hide real bugs if the
code is modified in a way that relies on a sane value of some
variable. They are false positives if the code is actually correct
and does not need to be changed.

I actually have a newer version of my patch (see below) that uses
the cc-disable-warning macro in order to avoid some of the
side-effects of setting an unknown option on older gcc versions.

> Furthermore, "-Wno-maybe-uninitialized" gcc-option is available
> gcc-4-7+, so your patch is incomplete.

O don't understand. The patch avoids the warnings when building
with gcc-4.7 or higher with -Os. 

Arnd


>From d313219a2f2e0753b8e96105b7a944e1c22566ae Mon Sep 17 00:00:00 2001
From: Arnd Bergmann 
Date: Fri, 15 Feb 2013 21:23:58 +0100
Subject: [PATCH] Turn off -Wmaybe-uninitialized when building with -Os

gcc-4.7 and higher add a lot of false positive warnings about
potential uses of uninitialized warnings, but only when optimizing
for size (-Os). This is the default when building allyesconfig,
which turns on CONFIG_CC_OPTIMIZE_FOR_SIZE.

In order to avoid getting a lot of patches that initialize such
variables and accidentally hide real errors along the way, let's
just turn off this warning on the respective gcc versions
when building with size optimizations. The -Wmaybe-uninitialized
option was introduced in the same gcc version (4.7) that is now
causing the false positives, so there is no effect on older compilers.

A side effect is that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE,
we might now see /fewer/ warnings about possibly uninitialized
warnings than with -O2, but that is still much better than seeing
warnings known to be bogus.

Signed-off-by: Arnd Bergmann 

diff --git a/Makefile b/Makefile
index 473beb1..f0ec9bc 100644
--- a/Makefile
+++ b/Makefile
@@ -570,7 +570,7 @@ endif # $(dot-config)
 all: vmlinux
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS  += -Os
+KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
 else
 KBUILD_CFLAGS  += -O2
 endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-03-01 Thread Sedat Dilek
On Fri, Feb 15, 2013 at 9:05 PM, Arnd Bergmann  wrote:
> On Friday 15 February 2013, Greg KH wrote:
>> On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
>> >
>> > After merging the char-misc tree, today's linux-next build (x86_64
>> > allmodconfig) produced this warning:
>> >
>> > drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
>> > drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used 
>> > uninitialized in this function [-Wuninitialized]
>> >
>> > Its a false positive, but it was introduced by commit 867ff9880d5d
>> > ("w1_therm: Retries: remove old code add CRC")
>>
>> I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
>> version of gcc to not show these false positives?
>
> I have finally put the pieces of the puzzle together. I already knew
> that some of these warnings only happen when building with -Os (even
> in gcc-4.8), since gcc turns off the inlining at a point after it
> determines that the variable might be used uninitialized but before
> determining that it's actually isn't.
>
> I think the best way forward is to disable this particular warning
> when building with -Os (which is enabled in allyesconfig). A false
> positive seems more harmful than a false negative here, because it
> prompts people to add broken initializations. This patch indeed
> makes the majority of the allyesconfig warnings on ARM go away.
> For the regular defconfig builds, we are already mostly clean,
> and those are built with -O2.
>
> Signed-off-by: Arnd Bergmann 
>
> diff --git a/Makefile b/Makefile
> index 0b4bf62..4d60d97 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -570,7 +570,7 @@ endif # $(dot-config)
>  all: vmlinux
>
>  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
> -KBUILD_CFLAGS  += -Os
> +KBUILD_CFLAGS  += -Os $(call cc-option,-Wno-maybe-uninitialized,)
>  else
>  KBUILD_CFLAGS  += -O2
>  endif

I have seen a lot of such failures when using the Freetz (a small
router project) build-system with gcc-4.7-x where "-Os" is default
optimization-level.

Last, when I tried to integrate ltrace GIT snapshots into Freetz.
All these "build-errors" could be solved in changing ltrace code.
So, I would not talk about "false positives".

Furthermore, "-Wno-maybe-uninitialized" gcc-option is available
gcc-4-7+, so your patch is incomplete.
Setting it is a "workaround" and a bit rough to stop compilation.
Here, I have it only activated for ltrace compilation.

I am attaching my ltrace.mk file for Freetz.

Greetings from Tuebingen to Tuebingen,
- Sedat -

[ ltrace.mk ]
...
# Set compiler options to suppress warnings treated as errors
# Reference: gcc manual chapter "3.8 Options to Request or Suppress Warnings"
# 
# EXAMPLE: TARGET_CC_OPTS := -Wno-error=maybe-uninitialized (here: gcc-4.7)
ifneq (,$(strip $(filter 4.7,$(TARGET_TOOLCHAIN_GCC_MAJOR_VERSION
TARGET_CC_OPTS := -Wno-error=maybe-uninitialized
else
TARGET_CC_OPTS :=
endif
...
- EOT -


ltrace.mk
Description: Binary data


Re: linux-next: build warning after merge of the char-misc tree

2013-03-01 Thread Sedat Dilek
On Fri, Feb 15, 2013 at 9:05 PM, Arnd Bergmann a...@arndb.de wrote:
 On Friday 15 February 2013, Greg KH wrote:
 On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
 
  After merging the char-misc tree, today's linux-next build (x86_64
  allmodconfig) produced this warning:
 
  drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
  drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used 
  uninitialized in this function [-Wuninitialized]
 
  Its a false positive, but it was introduced by commit 867ff9880d5d
  (w1_therm: Retries: remove old code add CRC)

 I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
 version of gcc to not show these false positives?

 I have finally put the pieces of the puzzle together. I already knew
 that some of these warnings only happen when building with -Os (even
 in gcc-4.8), since gcc turns off the inlining at a point after it
 determines that the variable might be used uninitialized but before
 determining that it's actually isn't.

 I think the best way forward is to disable this particular warning
 when building with -Os (which is enabled in allyesconfig). A false
 positive seems more harmful than a false negative here, because it
 prompts people to add broken initializations. This patch indeed
 makes the majority of the allyesconfig warnings on ARM go away.
 For the regular defconfig builds, we are already mostly clean,
 and those are built with -O2.

 Signed-off-by: Arnd Bergmann a...@arndb.de

 diff --git a/Makefile b/Makefile
 index 0b4bf62..4d60d97 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -570,7 +570,7 @@ endif # $(dot-config)
  all: vmlinux

  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 -KBUILD_CFLAGS  += -Os
 +KBUILD_CFLAGS  += -Os $(call cc-option,-Wno-maybe-uninitialized,)
  else
  KBUILD_CFLAGS  += -O2
  endif

I have seen a lot of such failures when using the Freetz (a small
router project) build-system with gcc-4.7-x where -Os is default
optimization-level.

Last, when I tried to integrate ltrace GIT snapshots into Freetz.
All these build-errors could be solved in changing ltrace code.
So, I would not talk about false positives.

Furthermore, -Wno-maybe-uninitialized gcc-option is available
gcc-4-7+, so your patch is incomplete.
Setting it is a workaround and a bit rough to stop compilation.
Here, I have it only activated for ltrace compilation.

I am attaching my ltrace.mk file for Freetz.

Greetings from Tuebingen to Tuebingen,
- Sedat -

[ ltrace.mk ]
...
# Set compiler options to suppress warnings treated as errors
# Reference: gcc manual chapter 3.8 Options to Request or Suppress Warnings
# http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options
# EXAMPLE: TARGET_CC_OPTS := -Wno-error=maybe-uninitialized (here: gcc-4.7)
ifneq (,$(strip $(filter 4.7,$(TARGET_TOOLCHAIN_GCC_MAJOR_VERSION
TARGET_CC_OPTS := -Wno-error=maybe-uninitialized
else
TARGET_CC_OPTS :=
endif
...
- EOT -


ltrace.mk
Description: Binary data


Re: linux-next: build warning after merge of the char-misc tree

2013-03-01 Thread Arnd Bergmann
On Friday 01 March 2013, Sedat Dilek wrote:
 I have seen a lot of such failures when using the Freetz (a small
 router project) build-system with gcc-4.7-x where -Os is default
 optimization-level.
 
 Last, when I tried to integrate ltrace GIT snapshots into Freetz.
 All these build-errors could be solved in changing ltrace code.
 So, I would not talk about false positives.

But the point is that we should not be changing the source code to
unnecessary initializations, because that may hide real bugs if the
code is modified in a way that relies on a sane value of some
variable. They are false positives if the code is actually correct
and does not need to be changed.

I actually have a newer version of my patch (see below) that uses
the cc-disable-warning macro in order to avoid some of the
side-effects of setting an unknown option on older gcc versions.

 Furthermore, -Wno-maybe-uninitialized gcc-option is available
 gcc-4-7+, so your patch is incomplete.

O don't understand. The patch avoids the warnings when building
with gcc-4.7 or higher with -Os. 

Arnd


From d313219a2f2e0753b8e96105b7a944e1c22566ae Mon Sep 17 00:00:00 2001
From: Arnd Bergmann a...@arndb.de
Date: Fri, 15 Feb 2013 21:23:58 +0100
Subject: [PATCH] Turn off -Wmaybe-uninitialized when building with -Os

gcc-4.7 and higher add a lot of false positive warnings about
potential uses of uninitialized warnings, but only when optimizing
for size (-Os). This is the default when building allyesconfig,
which turns on CONFIG_CC_OPTIMIZE_FOR_SIZE.

In order to avoid getting a lot of patches that initialize such
variables and accidentally hide real errors along the way, let's
just turn off this warning on the respective gcc versions
when building with size optimizations. The -Wmaybe-uninitialized
option was introduced in the same gcc version (4.7) that is now
causing the false positives, so there is no effect on older compilers.

A side effect is that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE,
we might now see /fewer/ warnings about possibly uninitialized
warnings than with -O2, but that is still much better than seeing
warnings known to be bogus.

Signed-off-by: Arnd Bergmann a...@arndb.de

diff --git a/Makefile b/Makefile
index 473beb1..f0ec9bc 100644
--- a/Makefile
+++ b/Makefile
@@ -570,7 +570,7 @@ endif # $(dot-config)
 all: vmlinux
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS  += -Os
+KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
 else
 KBUILD_CFLAGS  += -O2
 endif
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-03-01 Thread Sedat Dilek
On Fri, Mar 1, 2013 at 6:16 PM, Arnd Bergmann a...@arndb.de wrote:
 On Friday 01 March 2013, Sedat Dilek wrote:
 I have seen a lot of such failures when using the Freetz (a small
 router project) build-system with gcc-4.7-x where -Os is default
 optimization-level.

 Last, when I tried to integrate ltrace GIT snapshots into Freetz.
 All these build-errors could be solved in changing ltrace code.
 So, I would not talk about false positives.

 But the point is that we should not be changing the source code to
 unnecessary initializations, because that may hide real bugs if the
 code is modified in a way that relies on a sane value of some
 variable. They are false positives if the code is actually correct
 and does not need to be changed.

 I actually have a newer version of my patch (see below) that uses
 the cc-disable-warning macro in order to avoid some of the
 side-effects of setting an unknown option on older gcc versions.

 Furthermore, -Wno-maybe-uninitialized gcc-option is available
 gcc-4-7+, so your patch is incomplete.

 O don't understand. The patch avoids the warnings when building
 with gcc-4.7 or higher with -Os.


If the ...$(call cc-disable-warning...) line is checking $compiler for
$feature_is-available than I have misunderstood it.

Looks good, thanks.

- Sedat -

 Arnd


 From d313219a2f2e0753b8e96105b7a944e1c22566ae Mon Sep 17 00:00:00 2001
 From: Arnd Bergmann a...@arndb.de
 Date: Fri, 15 Feb 2013 21:23:58 +0100
 Subject: [PATCH] Turn off -Wmaybe-uninitialized when building with -Os

 gcc-4.7 and higher add a lot of false positive warnings about
 potential uses of uninitialized warnings, but only when optimizing
 for size (-Os). This is the default when building allyesconfig,
 which turns on CONFIG_CC_OPTIMIZE_FOR_SIZE.

 In order to avoid getting a lot of patches that initialize such
 variables and accidentally hide real errors along the way, let's
 just turn off this warning on the respective gcc versions
 when building with size optimizations. The -Wmaybe-uninitialized
 option was introduced in the same gcc version (4.7) that is now
 causing the false positives, so there is no effect on older compilers.

 A side effect is that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE,
 we might now see /fewer/ warnings about possibly uninitialized
 warnings than with -O2, but that is still much better than seeing
 warnings known to be bogus.

 Signed-off-by: Arnd Bergmann a...@arndb.de

 diff --git a/Makefile b/Makefile
 index 473beb1..f0ec9bc 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -570,7 +570,7 @@ endif # $(dot-config)
  all: vmlinux

  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 -KBUILD_CFLAGS  += -Os
 +KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
  else
  KBUILD_CFLAGS  += -O2
  endif
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-02-15 Thread Arnd Bergmann
On Friday 15 February 2013, Greg KH wrote:
> On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
> > 
> > After merging the char-misc tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> > 
> > drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
> > drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used 
> > uninitialized in this function [-Wuninitialized]
> > 
> > Its a false positive, but it was introduced by commit 867ff9880d5d
> > ("w1_therm: Retries: remove old code add CRC")
> 
> I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
> version of gcc to not show these false positives?

I have finally put the pieces of the puzzle together. I already knew
that some of these warnings only happen when building with -Os (even
in gcc-4.8), since gcc turns off the inlining at a point after it
determines that the variable might be used uninitialized but before
determining that it's actually isn't.

I think the best way forward is to disable this particular warning
when building with -Os (which is enabled in allyesconfig). A false
positive seems more harmful than a false negative here, because it
prompts people to add broken initializations. This patch indeed
makes the majority of the allyesconfig warnings on ARM go away.
For the regular defconfig builds, we are already mostly clean,
and those are built with -O2.

Signed-off-by: Arnd Bergmann 

diff --git a/Makefile b/Makefile
index 0b4bf62..4d60d97 100644
--- a/Makefile
+++ b/Makefile
@@ -570,7 +570,7 @@ endif # $(dot-config)
 all: vmlinux
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS  += -Os
+KBUILD_CFLAGS  += -Os $(call cc-option,-Wno-maybe-uninitialized,)
 else
 KBUILD_CFLAGS  += -O2
 endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-02-15 Thread Arnd Bergmann
On Friday 15 February 2013, Greg KH wrote:
> On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the char-misc tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> > 
> > drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
> > drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used 
> > uninitialized in this function [-Wuninitialized]
> > 
> > Its a false positive, but it was introduced by commit 867ff9880d5d
> > ("w1_therm: Retries: remove old code add CRC")
> 
> I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
> version of gcc to not show these false positives?

I see the same warning with gcc-4.6.3, 4.7.2 and 4.8.0-20130114 on ARM.

In case of 4.8, the output is

drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
  c -= snprintf(buf + PAGE_SIZE - c, c, ": crc=%02x %s\n",
   ^

I actually see much more of these false positives with 4.7 and 4.8 than
I get with 4.6, which is the main reason for me to use 4.6 for my daily
builds. I agree that this particular false positive is an especially
dumb one and it would be good to not just shut up gcc by initializing
it, but I have no other idea what to do with the hundreds of such
warnings I get.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-02-15 Thread Greg KH
On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the char-misc tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
> drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used uninitialized 
> in this function [-Wuninitialized]
> 
> Its a false positive, but it was introduced by commit 867ff9880d5d
> ("w1_therm: Retries: remove old code add CRC")

I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
version of gcc to not show these false positives?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-02-15 Thread Greg KH
On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
 Hi all,
 
 After merging the char-misc tree, today's linux-next build (x86_64
 allmodconfig) produced this warning:
 
 drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
 drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used uninitialized 
 in this function [-Wuninitialized]
 
 Its a false positive, but it was introduced by commit 867ff9880d5d
 (w1_therm: Retries: remove old code add CRC)

I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
version of gcc to not show these false positives?

thanks,

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-02-15 Thread Arnd Bergmann
On Friday 15 February 2013, Greg KH wrote:
 On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
  Hi all,
  
  After merging the char-misc tree, today's linux-next build (x86_64
  allmodconfig) produced this warning:
  
  drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
  drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used 
  uninitialized in this function [-Wuninitialized]
  
  Its a false positive, but it was introduced by commit 867ff9880d5d
  (w1_therm: Retries: remove old code add CRC)
 
 I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
 version of gcc to not show these false positives?

I see the same warning with gcc-4.6.3, 4.7.2 and 4.8.0-20130114 on ARM.

In case of 4.8, the output is

drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
  c -= snprintf(buf + PAGE_SIZE - c, c, : crc=%02x %s\n,
   ^

I actually see much more of these false positives with 4.7 and 4.8 than
I get with 4.6, which is the main reason for me to use 4.6 for my daily
builds. I agree that this particular false positive is an especially
dumb one and it would be good to not just shut up gcc by initializing
it, but I have no other idea what to do with the hundreds of such
warnings I get.

Arnd
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warning after merge of the char-misc tree

2013-02-15 Thread Arnd Bergmann
On Friday 15 February 2013, Greg KH wrote:
 On Fri, Feb 15, 2013 at 04:26:57PM +1100, Stephen Rothwell wrote:
  
  After merging the char-misc tree, today's linux-next build (x86_64
  allmodconfig) produced this warning:
  
  drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
  drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used 
  uninitialized in this function [-Wuninitialized]
  
  Its a false positive, but it was introduced by commit 867ff9880d5d
  (w1_therm: Retries: remove old code add CRC)
 
 I don't see that here with gcc 4.7.1, perhaps you need to upgrade your
 version of gcc to not show these false positives?

I have finally put the pieces of the puzzle together. I already knew
that some of these warnings only happen when building with -Os (even
in gcc-4.8), since gcc turns off the inlining at a point after it
determines that the variable might be used uninitialized but before
determining that it's actually isn't.

I think the best way forward is to disable this particular warning
when building with -Os (which is enabled in allyesconfig). A false
positive seems more harmful than a false negative here, because it
prompts people to add broken initializations. This patch indeed
makes the majority of the allyesconfig warnings on ARM go away.
For the regular defconfig builds, we are already mostly clean,
and those are built with -O2.

Signed-off-by: Arnd Bergmann a...@arndb.de

diff --git a/Makefile b/Makefile
index 0b4bf62..4d60d97 100644
--- a/Makefile
+++ b/Makefile
@@ -570,7 +570,7 @@ endif # $(dot-config)
 all: vmlinux
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS  += -Os
+KBUILD_CFLAGS  += -Os $(call cc-option,-Wno-maybe-uninitialized,)
 else
 KBUILD_CFLAGS  += -O2
 endif
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: build warning after merge of the char-misc tree

2013-02-14 Thread Stephen Rothwell
Hi all,

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

drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used uninitialized 
in this function [-Wuninitialized]

Its a false positive, but it was introduced by commit 867ff9880d5d
("w1_therm: Retries: remove old code add CRC")
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgp_rJrzdIMBZ.pgp
Description: PGP signature


linux-next: build warning after merge of the char-misc tree

2013-02-14 Thread Stephen Rothwell
Hi all,

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

drivers/w1/slaves/w1_therm.c: In function 'w1_therm_read':
drivers/w1/slaves/w1_therm.c:245:15: warning: 'crc' may be used uninitialized 
in this function [-Wuninitialized]

Its a false positive, but it was introduced by commit 867ff9880d5d
(w1_therm: Retries: remove old code add CRC)
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgp_rJrzdIMBZ.pgp
Description: PGP signature