Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1519918
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized |
| Date | 2016-11-11 18:20 +0100 |
| Message-ID | <sCnEC-7ay-15@gated-at.bofh.it> (permalink) |
| References | <sC0I2-h7-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Nov 10, 2016 at 8:44 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> Please merge these directly if you are happy with the result.
I will take this.
I do see two warnings, but they both seem to be valid and recent,
though, so I have no issues with the spurious cases.
Warning #1:
sound/soc/qcom/lpass-platform.c: In function ‘lpass_platform_pcmops_open’:
sound/soc/qcom/lpass-platform.c:83:29: warning: ‘dma_ch’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
drvdata->substream[dma_ch] = substream;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
and 'dma_ch' usage there really is crazy and wrong. Broken by
022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage")
Warning #2 is not a real bug, but it's reasonable that gcc doesn't
know that storage_bytes (chip->read_size) has to be 2/4. Again,
introduced recently by commit 231147ee77f3 ("iio: maxim_thermocouple:
Align 16 bit big endian value of raw reads"), so you didn't see it.
drivers/iio/temperature/maxim_thermocouple.c: In function
‘maxim_thermocouple_read_raw’:
drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: ‘ret’
may be used uninitialized in this function [-Wmaybe-uninitialized]
if (ret)
^
drivers/iio/temperature/maxim_thermocouple.c:128:6: note: ‘ret’ was
declared here
int ret;
^~~
and I guess that code can just initialize 'ret' to '-EINVAL' or
something to just make the theoretical "somehow we had a wrong
chip->read_size" case error out cleanly.
Linus
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/11] getting back -Wmaybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
[PATCH v2 01/11] Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
[PATCH v2 06/11] [media] dib0700: fix nec repeat handling Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
[PATCH v2 10/11] pcmcia: fix return value of soc_pcmcia_regulator_set Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
[PATCH v2 07/11] [media] rc: print correct variable for z8f0811 Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
[PATCH v2 08/11] crypto: aesni: shut up -Wmaybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
[PATCH v2 02/11] NFSv4.1: work around -Wmaybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
[PATCH v2 11/11] Kbuild: enable -Wmaybe-uninitialized warnings by default Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
[PATCH v2 09/11] [v3] infiniband: shut up a maybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-11-10 18:00 +0100
[PATCH v2 03/11] x86: apm: avoid uninitialized data Arnd Bergmann <arnd@arndb.de> - 2016-11-10 18:00 +0100
Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-11 18:20 +0100
Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2016-11-11 21:00 +0100
Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized Jonathan Cameron <jic23@kernel.org> - 2016-11-12 14:30 +0100
Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized Greg KH <gregkh@linuxfoundation.org> - 2016-11-13 09:50 +0100
Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized Greg KH <gregkh@linuxfoundation.org> - 2016-11-13 11:40 +0100
csiph-web