From: Hiep Cao Minh <cm-hiep@jinso.co.jp>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@kernel.org>,
Chris Brandt <chris.brandt@renesas.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: rspi: avoid uninitialized variable access
Date: Fri, 11 Nov 2016 09:58:27 +0900 [thread overview]
Message-ID: <582517B3.5010407@jinso.co.jp> (raw)
In-Reply-To: <5755979.RXybIODAnf@wuerfel>
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,
prev parent reply other threads:[~2016-11-11 0:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 13:46 [PATCH] spi: rspi: avoid uninitialized variable access Arnd Bergmann
2016-11-08 17:20 ` Chris Brandt
2016-11-08 17:40 ` Mark Brown
2016-11-08 18:35 ` Geert Uytterhoeven
2016-11-09 15:00 ` Applied "spi: rspi: avoid uninitialized variable access" to the spi tree Mark Brown
2016-11-10 9:25 ` [PATCH] spi: rspi: avoid uninitialized variable access Hiep Cao Minh
2016-11-10 10:51 ` Arnd Bergmann
2016-11-11 0:58 ` Hiep Cao Minh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=582517B3.5010407@jinso.co.jp \
--to=cm-hiep@jinso.co.jp \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=chris.brandt@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox