Skip to content

Commit 4b80294

Browse files
John B. Wyatt IVshuahkh
authored andcommitted
pm:cpupower: Add missing powercap_set_enabled() stub function
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: c2294c1 ("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>
1 parent 76fb981 commit 4b80294

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/power/cpupower/lib/powercap.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ int powercap_get_enabled(int *mode)
7777
return sysfs_get_enabled(path, mode);
7878
}
7979

80+
/*
81+
* TODO: implement function. Returns dummy 0 for now.
82+
*/
83+
int powercap_set_enabled(int mode)
84+
{
85+
return 0;
86+
}
87+
8088
/*
8189
* Hardcoded, because rapl is the only powercap implementation
8290
- * this needs to get more generic if more powercap implementations

0 commit comments

Comments
 (0)