powercap: intel_rapl: Use index to initialize primitive information
mainline inclusion from mainline-v6.5-rc1 commit 11edbe5c category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I92135 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=11edbe5c66d624e2e1eec8929d3668d76a574c3b -------------------------------- Currently, the RAPL primitive information array is required to be initialized in the order of enum rapl_primitives. This can break easily, especially when different RAPL Interfaces may support different sets of primitives. Convert the code to initialize the primitive information using array index explicitly. No functional change. Intel-SIG: commit 11edbe5c powercap: intel_rapl: Use index to initialize primitive information. Backport Intel RAPL driver support on TPMI. Signed-off-by:Zhang Rui <rui.zhang@intel.com> Tested-by:
Wang Wendy <wendy.wang@intel.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> [ Xiaolong Wang: amend commit log ] Signed-off-by:
Xiaolong Wang <xiaolong.wang@intel.com>
Loading
Please sign in to comment