lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240905021916.15938-2-jwyatt@redhat.com>
Date: Wed,  4 Sep 2024 22:19:08 -0400
From: "John B. Wyatt IV" <jwyatt@...hat.com>
To: Shuah Khan <skhan@...uxfoundation.org>
Cc: "John B. Wyatt IV" <jwyatt@...hat.com>,
	linux-pm@...r.kernel.org,
	Thomas Renninger <trenn@...e.com>,
	Shuah Khan <shuah@...nel.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	John Kacur <jkacur@...hat.com>,
	Tomas Glozar <tglozar@...hat.com>,
	Arnaldo Melo <acme@...hat.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"John B. Wyatt IV" <sageofredondo@...il.com>
Subject: [PATCH v3 1/4] 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.

Suggested-by: Shuah Khan <skhan@...uxfoundation.org>
Signed-off-by: John B. Wyatt IV <jwyatt@...hat.com>
Signed-off-by: John B. Wyatt IV <sageofredondo@...il.com>
---

Changes in v3:
	- Renamed commit header, moved commit to be the first in the
	  patchset as requested by Shuah Khan. Adjusted commit message
	  body to match.
	- Added pm:cpupower prefix to header and Rafael to Cc

Changes in v2:
	- Implemented the function so SWIG will accept the header
	  definition
---
 tools/power/cpupower/lib/powercap.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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
@@ -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
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ