All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Takashi Iwai <tiwai@suse.de>, Mark Brown <broonie@kernel.org>
Cc: Brian Austin <brian.austin@cirrus.com>,
	Arnaud Pouliquen <arnaud.pouliquen@st.com>,
	alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: Missing return check of of_property_read_*()
Date: Wed, 09 Sep 2015 17:05:05 +0200	[thread overview]
Message-ID: <55F04AA1.3030607@metafoo.de> (raw)
In-Reply-To: <s5hh9n3d4bk.wl-tiwai@suse.de>

On 09/09/2015 05:01 PM, Takashi Iwai wrote:
> On Wed, 09 Sep 2015 16:51:58 +0200,
> Mark Brown wrote:
>>
>> On Wed, Sep 09, 2015 at 04:40:36PM +0200, Takashi Iwai wrote:
>>
>>> I hoped that I wouldn't need to write this kind of post, but since
>>> nothing happened so far, so here we go:
>>
>> Could you be more specific about nothing happening here...
> 
> A wonderful gift such like a devoted maintainer/developer already
> fixing these bugs magically :)
> 
>>> The following compile warnings are present for quite some time.  They
>>> are due to the lack of return check from of_property_read*().
>>
>>> sound/soc/codecs/cs35l32.c: In function ‘cs35l32_i2c_probe’:
>>> sound/soc/codecs/cs35l32.c:278:2: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>   switch (val) {
>>>   ^
>>> sound/soc/codecs/cs35l32.c:272:15: note: ‘val’ was declared here
>>>   unsigned int val;
>>>                ^
>>
>> How are you generating these - what compiler and config?  None of the
>> build bots are reporting any of the warnings you have here.
> 
> Then maybe this can be seen since gcc 5.x.  A good progress of gcc.
> I've seen this since the beginning of merge for cs35l32.c (and I
> reported this already at merging the branch).
> 
> There is nothing special in config or compiler option, just use the
> normal x86-64 build with CONFIG_COMPILE_TEST.  I'm using gcc-5.1.1 for
> now.

I think you'll get them for any config with CONFIG_OF disabled. I've been
seeing those warnings for a while now when compile-testing for x86 and I'm
still on gcc 4.9.

But even if you don't get the warning the code is still broken, the compiler
just does not know.

- Lars

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2015-09-09 15:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 14:40 Missing return check of of_property_read_*() Takashi Iwai
2015-09-09 14:51 ` Mark Brown
2015-09-09 14:55   ` Brian Austin
2015-09-09 15:05     ` Takashi Iwai
2015-09-09 15:57       ` Mark Brown
2015-09-09 16:01         ` Takashi Iwai
2015-09-09 16:19           ` Mark Brown
2015-09-09 16:27             ` Takashi Iwai
2015-09-10  3:10               ` Fengguang Wu
2015-09-10  3:23                 ` Fengguang Wu
2015-09-10  5:32                   ` Takashi Iwai
2015-09-10  5:45                     ` Takashi Iwai
2015-09-10  6:24                     ` Fengguang Wu
2015-09-10 10:54                       ` Mark Brown
2015-09-10 11:17                         ` Fengguang Wu
2015-09-10 18:19           ` Mark Brown
2015-09-09 15:13     ` Mark Brown
2015-09-09 15:01   ` Takashi Iwai
2015-09-09 15:05     ` Lars-Peter Clausen [this message]
2015-09-09 15:07       ` Takashi Iwai
2015-09-09 15:33       ` Mark Brown
2015-10-02 10:34       ` Question about patch ASoC: Prevent components from being bound to multiple cards Koro Chen
2015-10-02 14:48         ` Mark Brown
2015-10-03 15:01           ` Koro Chen
2015-10-05 10:07             ` Mark Brown
2015-10-05 10:08               ` Mark Brown
2015-10-05 11:28               ` Koro Chen

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=55F04AA1.3030607@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=brian.austin@cirrus.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.de \
    /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 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.