提交 eade39b2 编写于 作者: A Artem Bityutskiy 提交者: Len Brown

tools/power turbostat: cleanup 'automatic_cstate_conversion_probe()'

The 'automatic_cstate_conversion_probe()' function has a too long 'if'
statement, convert it to a 'switch' statement in order to improve code
readability a bit.
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 684e40e9
......@@ -4816,8 +4816,16 @@ void perf_limit_reasons_probe(unsigned int family, unsigned int model)
void automatic_cstate_conversion_probe(unsigned int family, unsigned int model)
{
if (is_skx(family, model) || is_bdx(family, model) || is_icx(family, model) || is_spr(family, model))
if (family != 6)
return;
switch (model) {
case INTEL_FAM6_BROADWELL_X:
case INTEL_FAM6_SKYLAKE_X:
case INTEL_FAM6_ICELAKE_X:
case INTEL_FAM6_SAPPHIRERAPIDS_X:
has_automatic_cstate_conversion = 1;
}
}
void prewake_cstate_probe(unsigned int family, unsigned int model)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册