summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-04-19 17:47:04 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-27 07:10:38 (GMT)
commit4420e5f323c408990834dddb61eb16e4a95a41e4 (patch)
tree257a2f7ab27acc9ce4074904c165a610a07be05e /drivers/mmc
parent11ba522d7929b9c319fd31d95bbc917baad9fe6f (diff)
downloadlinux-4420e5f323c408990834dddb61eb16e4a95a41e4.tar.xz
ACPI / power: Avoid maybe-uninitialized warning
commit fe8c470ab87d90e4b5115902dd94eced7e3305c3 upstream. gcc -O2 cannot always prove that the loop in acpi_power_get_inferred_state() is enterered at least once, so it assumes that cur_state might not get initialized: drivers/acpi/power.c: In function 'acpi_power_get_inferred_state': drivers/acpi/power.c:222:9: error: 'cur_state' may be used uninitialized in this function [-Werror=maybe-uninitialized] This sets the variable to zero at the start of the loop, to ensure that there is well-defined behavior even for an empty list. This gets rid of the warning. The warning first showed up when the -Os flag got removed in a bug fix patch in linux-4.11-rc5. I would suggest merging this addon patch on top of that bug fix to avoid introducing a new warning in the stable kernels. Fixes: 61b79e16c68d (ACPI: Fix incompatibility with mcount-based function graph tracing) Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc')
0 files changed, 0 insertions, 0 deletions