summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohn B. Wyatt IV <jwyatt@redhat.com>2024-09-05 05:19:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-04 17:28:55 +0300
commit4589bb97e42f2cfc5cbf0fe09d9e5afad905ec62 (patch)
tree043e07da1f2bf46f925071c6009413116c0ed3ff /tools
parentfb2d057539eda67ec7cfc369bf587e6518a9b99d (diff)
downloadlinux-4589bb97e42f2cfc5cbf0fe09d9e5afad905ec62.tar.xz
pm:cpupower: Add missing powercap_set_enabled() stub function
[ Upstream commit 4b80294fb53845dc5c98cca0c989da09150f2ca9 ] There was a symbol listed in the powercap.h file that was not implemented. Implement it with a stub return of 0. Programs like SWIG require that functions that are defined in the headers be implemented. Fixes: c2294c1496b7 ("cpupower: Introduce powercap intel-rapl library and powercap-info command") Suggested-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com> Signed-off-by: John B. Wyatt IV <sageofredondo@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/power/cpupower/lib/powercap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/power/cpupower/lib/powercap.c b/tools/power/cpupower/lib/powercap.c
index a7a59c6bacda..94a0c69e55ef 100644
--- a/tools/power/cpupower/lib/powercap.c
+++ b/tools/power/cpupower/lib/powercap.c
@@ -78,6 +78,14 @@ int powercap_get_enabled(int *mode)
}
/*
+ * TODO: implement function. Returns dummy 0 for now.
+ */
+int powercap_set_enabled(int mode)
+{
+ return 0;
+}
+
+/*
* Hardcoded, because rapl is the only powercap implementation
- * this needs to get more generic if more powercap implementations
* should show up