From: "Vincent Stehlé" <v-stehle@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regmap: debugfs: Fix compilation warning
Date: Tue, 22 Jan 2013 11:07:04 +0100 [thread overview]
Message-ID: <50FE64C8.8040407@ti.com> (raw)
In-Reply-To: <20130122064121.GC1766@opensource.wolfsonmicro.com>
On 01/22/2013 07:41 AM, Mark Brown wrote:
(..)
> This sort of fix is not a good idea, you're just shutting the
> warning up without any sort of analysis explaining why it's
> generated in error. If it's generating a spurious error that's a
> compiler bug.
In the regmap_debugfs_get_dump_start() function control flow, I think
the compiler cannot know for sure that the list_for_each_entry()
iterates at least once.:
regmap_debugfs_get_dump_start()
{
unsigned int ret;
<snip some code, which does not touch ret>
list_for_each_entry() {
<snip some code>
ret = <value>;
}
return ret;
}
Do you think there is a way to "mark" the list_for_each_entry() as
iterating at least once? an __attribute__ maybe?
Best regards,
V.
next prev parent reply other threads:[~2013-01-22 10:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1358779015-25735-1-git-send-email-v-stehle@ti.com>
2013-01-22 6:41 ` [PATCH] regmap: debugfs: Fix compilation warning Mark Brown
2013-01-22 10:07 ` Vincent Stehlé [this message]
2013-01-23 15:58 ` Mark Brown
2013-01-24 10:12 ` Vincent Stehlé
2013-01-26 10:02 ` Mark Brown
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=50FE64C8.8040407@ti.com \
--to=v-stehle@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@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 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.