Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1519491
| From | Hiep Cao Minh <cm-hiep@jinso.co.jp> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] spi: rspi: avoid uninitialized variable access |
| Date | 2016-11-11 02:00 +0100 |
| Message-ID | <sC8me-5uc-11@gated-at.bofh.it> (permalink) |
| References | <sBeWK-1y1-15@gated-at.bofh.it> <sBUsW-4g1-21@gated-at.bofh.it> <sBVfk-4HF-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Arnd,
On 11/10/2016 07:51 PM, Arnd Bergmann wrote:
> On Thursday, November 10, 2016 6:25:56 PM CET Hiep Cao Minh wrote:
>> Hi Arnd,
>>
>> Thanks for your fixed patch.
>>
>> On 11/08/2016 10:46 PM, Arnd Bergmann wrote:
>>> The newly introduced rspi_pio_transfer_in_or_our() function must
>>> take either a valid 'rx' or 'tx' pointer, and has undefined behavior
>>> if both are NULL, as found by 'gcc -Wmaybe-unintialized':
>>>
>>> drivers/spi/spi-rspi.c: In function 'rspi_pio_transfer_in_or_our':
>>> drivers/spi/spi-rspi.c:558:5: error: 'len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>> Could you tell me what kind of GCC are you using?
>> I'd like to reproduce it on my environment, too.
>> I am using the Linaro's gcc of
>> "gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux".
>> But there is no error message like this on my environment.
> The warning is currently disabled in mainline Linux, but I'm trying to
> address this and hope to still get a revert of 6e8d666e9253 ("Disable
> "maybe-uninitialized" warning globally") into v4.9.
>
> You can build with "make EXTRA_CFLAGS=-Wmaybe-uninitialized" in
> the meantime.
Thanks,
I used your command and found the warning.
Best regards,
Hiep
Jinzai Solution Inc,
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] spi: rspi: avoid uninitialized variable access Arnd Bergmann <arnd@arndb.de> - 2016-11-08 14:50 +0100
RE: [PATCH] spi: rspi: avoid uninitialized variable access Chris Brandt <Chris.Brandt@renesas.com> - 2016-11-08 18:30 +0100
Re: [PATCH] spi: rspi: avoid uninitialized variable access Mark Brown <broonie@kernel.org> - 2016-11-08 18:50 +0100
Re: [PATCH] spi: rspi: avoid uninitialized variable access Geert Uytterhoeven <geert@linux-m68k.org> - 2016-11-08 19:40 +0100
Applied "spi: rspi: avoid uninitialized variable access" to the spi tree Mark Brown <broonie@kernel.org> - 2016-11-09 16:10 +0100
Re: [PATCH] spi: rspi: avoid uninitialized variable access Hiep Cao Minh <cm-hiep@jinso.co.jp> - 2016-11-10 11:10 +0100
Re: [PATCH] spi: rspi: avoid uninitialized variable access Arnd Bergmann <arnd@arndb.de> - 2016-11-10 12:00 +0100
Re: [PATCH] spi: rspi: avoid uninitialized variable access Hiep Cao Minh <cm-hiep@jinso.co.jp> - 2016-11-11 02:00 +0100
csiph-web