regmap: debugfs: Work around GCC flow analysis false positives
Subsystems (2)
PATCH 1/1 regmap: debugfs: Work around GCC flow analysis false positives
Reported-by Vincent Stehlé <[email protected]>
Reported-by Arnd Bergmann <[email protected]>
Signed-off-by Mark Brown <[email protected]>
--- drivers/base/regmap/regmap-debugfs.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/base/regmap/regmap-debugfs.c +7 -0
@@ -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) {
Signature · 1 line
1.7.10.4
Quoted 3 lines · Mark Brown
Reported-by Vincent Stehlé <[email protected]>Reported-by Arnd Bergmann <[email protected]>Signed-off-by Mark Brown <[email protected]>
Thanks for fixing this properly.
Acked-by Arnd Bergmann <[email protected]>