linux/drivers/base/power/opp
Arnd Bergmann 4df27c9189 PM / OPP: avoid maybe-uninitialized warning
When CONFIG_OPTIMIZE_INLINING is set and we are building with -Wmaybe-uninitialized
enabled, we can get a warning for the opp core driver:

drivers/base/power/opp/core.c: In function 'dev_pm_opp_set_rate':
drivers/base/power/opp/core.c:560:8: warning: 'ou_volt_min' may be used uninitialized in this function [-Wmaybe-uninitialized]

This has only now appeared as a result of commit 797da5598f ("PM / devfreq:
Add COMPILE_TEST for build coverage"), which makes the driver visible in
some configurations that didn't have it before.

The warning is a false positive that I got with gcc-6.1.1, but there is
a simple workaround in removing the local variables that we get warnings
for (all three are affected depending on the configuration). This also
makes the code easier to read.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-09-17 00:58:00 +02:00
..
core.c PM / OPP: avoid maybe-uninitialized warning 2016-09-17 00:58:00 +02:00
cpu.c PM / OPP: Add 'UNKNOWN' status for shared_opp in struct opp_table 2016-06-16 15:50:36 +02:00
debugfs.c PM / OPP: Rename structures for clarity 2016-02-21 14:24:35 +01:00
Makefile PM / OPP: Move CONFIG_OF dependent code in a separate file 2016-05-06 13:22:49 +02:00
of.c PM / OPP: Add 'UNKNOWN' status for shared_opp in struct opp_table 2016-06-16 15:50:36 +02:00
opp.h PM / OPP: Add 'UNKNOWN' status for shared_opp in struct opp_table 2016-06-16 15:50:36 +02:00