From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: linux-kernel@vger.kernel.org
Cc: "Vincent Stehlé" <v-stehle@ti.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Mark Brown" <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH] regmap: debugfs: Work around GCC flow analysis false positives
Date: Sat, 26 Jan 2013 18:01:18 +0800 [thread overview]
Message-ID: <1359194478-31666-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
Reported-by: Vincent Stehlé <v-stehle@ti.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/base/regmap/regmap-debugfs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index d9a6c94..c6dc2e9 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -133,6 +133,13 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
return base;
}
+ /*
+ * Work around GCC flow analysis - it can't figure out we have
+ * at least one loop iteration.
+ */
+ *pos = c->min;
+ ret = c->base_reg;
+
/* Find the relevant block */
list_for_each_entry(c, &map->debugfs_off_cache, list) {
if (from >= c->min && from <= c->max) {
--
1.7.10.4
next reply other threads:[~2013-01-26 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-26 10:01 Mark Brown [this message]
2013-01-26 10:03 ` Arnd Bergmann
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=1359194478-31666-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=v-stehle@ti.com \
/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
all inboxes | Powered by JetHome®