From: "John B. Wyatt IV" <jwyatt@redhat.com>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: "John B. Wyatt IV" <jwyatt@redhat.com>,
linux-pm@vger.kernel.org, Thomas Renninger <trenn@suse.com>,
Shuah Khan <shuah@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, John Kacur <jkacur@redhat.com>,
Tomas Glozar <tglozar@redhat.com>, Arnaldo Melo <acme@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"John B. Wyatt IV" <sageofredondo@gmail.com>
Subject: [PATCH v3 1/4] pm:cpupower: Add missing powercap_set_enabled() stub function
Date: Wed, 4 Sep 2024 22:19:08 -0400 [thread overview]
Message-ID: <20240905021916.15938-2-jwyatt@redhat.com> (raw)
In-Reply-To: <20240905021916.15938-1-jwyatt@redhat.com>
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@linuxfoundation.org>
Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com>
Signed-off-by: John B. Wyatt IV <sageofredondo@gmail.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
next prev parent reply other threads:[~2024-09-05 2:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 2:19 [PATCH v3 0/4] Add SWIG Bindings to libcpupower John B. Wyatt IV
2024-09-05 2:19 ` John B. Wyatt IV [this message]
2024-09-05 2:19 ` [PATCH v3 2/4] pm:cpupower: Add SWIG bindings files for libcpupower John B. Wyatt IV
2024-09-21 21:23 ` Guenter Roeck
2024-09-22 15:39 ` Linus Torvalds
2024-09-23 13:29 ` John B. Wyatt IV
2024-09-23 16:09 ` Shuah Khan
2024-09-05 2:19 ` [PATCH v3 3/4] pm:cpupower: Include test_raw_pylibcpupower.py John B. Wyatt IV
2024-09-05 2:19 ` [PATCH v3 4/4] MAINTAINERS: Add Maintainers for SWIG Python bindings John B. Wyatt IV
2024-09-06 1:03 ` [PATCH v3 0/4] Add SWIG Bindings to libcpupower Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240905021916.15938-2-jwyatt@redhat.com \
--to=jwyatt@redhat.com \
--cc=acme@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sageofredondo@gmail.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tglozar@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=trenn@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox