public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regmap: debugfs: Work around GCC flow analysis false positives
@ 2013-01-26 10:01 Mark Brown
  2013-01-26 10:03 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2013-01-26 10:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Vincent Stehlé, Arnd Bergmann, Mark Brown

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regmap: debugfs: Work around GCC flow analysis false positives
  2013-01-26 10:01 [PATCH] regmap: debugfs: Work around GCC flow analysis false positives Mark Brown
@ 2013-01-26 10:03 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2013-01-26 10:03 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, Vincent Stehlé

On Saturday 26 January 2013, Mark Brown wrote:
> Reported-by: Vincent Stehlé <v-stehle@ti.com>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Thanks for fixing this properly.

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-26 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-26 10:01 [PATCH] regmap: debugfs: Work around GCC flow analysis false positives Mark Brown
2013-01-26 10:03 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox