提交 3ff79754 编写于 作者: S Srinivas Pandruvada 提交者: Rafael J. Wysocki

cpufreq: intel_pstate: Fix static checker warning for epp variable

Fix warning for:
drivers/cpufreq/intel_pstate.c:731 store_energy_performance_preference()
error: uninitialized symbol 'epp'.

This warning is for a case, when energy_performance_preference attribute
matches pre defined strings. In this case the value of raw epp will not
be used to set EPP bits in MSR_HWP_REQUEST. So initializing with any
value is fine.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 3a7e4fbb
......@@ -709,7 +709,7 @@ static ssize_t store_energy_performance_preference(
struct cpudata *cpu_data = all_cpu_data[policy->cpu];
char str_preference[21];
bool raw = false;
u32 epp;
u32 epp = 0;
int ret;
ret = sscanf(buf, "%20s", str_preference);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册