]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: use cpumask_var_t for on-stack cpu masks
authorArnd Bergmann <arnd@arndb.de>
Thu, 2 Feb 2017 14:46:26 +0000 (15:46 +0100)
committerZhang Rui <rui.zhang@intel.com>
Fri, 10 Feb 2017 08:40:47 +0000 (16:40 +0800)
commitceb53ec90ade350ca8610f8049f425c96ba0e6ca
treeebd559140f7c50cfa44e7e54296dad3d99ae9e1f
parent3817fb10340d8abb0fc6bea606c8410bf0d56dd2
thermal: use cpumask_var_t for on-stack cpu masks

Putting a bare cpumask structure on the stack produces a warning on
large SMP configurations:

drivers/thermal/cpu_cooling.c: In function 'cpufreq_state2power':
drivers/thermal/cpu_cooling.c:644:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
drivers/thermal/cpu_cooling.c: In function '__cpufreq_cooling_register':
drivers/thermal/cpu_cooling.c:898:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]

The recommended workaround is to use cpumask_var_t, which behaves just like
a normal cpu mask in most cases, but turns into a dynamic allocation
when CONFIG_CPUMASK_OFFSTACK is set.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/cpu_cooling.c