]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
pm:cpupower: Add missing powercap_set_enabled() stub function
authorJohn B. Wyatt IV <jwyatt@redhat.com>
Thu, 5 Sep 2024 02:19:08 +0000 (22:19 -0400)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 6 Sep 2024 00:48:57 +0000 (18:48 -0600)
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>
tools/power/cpupower/lib/powercap.c

index a7a59c6bacda81644d72c3023ad824365bfb33f5..94a0c69e55ef5e4291b13a4218e706fa8d14e6a7 100644 (file)
@@ -77,6 +77,14 @@ int powercap_get_enabled(int *mode)
        return sysfs_get_enabled(path, 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