From: Zhang Rui <rui.zhang@intel.com>
To: srinivas.pandruvada@intel.com
Cc: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org
Subject: [PATCH 2/3] tools/power/x86/intel-speed-select: Print Version info when Incompatible API version is detected
Date: Thu, 19 Mar 2026 13:52:55 +0800 [thread overview]
Message-ID: <20260319055256.3226034-2-rui.zhang@intel.com> (raw)
In-Reply-To: <20260319055256.3226034-1-rui.zhang@intel.com>
When running an old version intel-speed-select tool on newer platforms,
even with "intel-speed-select -v", the tool only complains about
"Incompatible API version", without giving the current version info.
Print Version info whenever Incompatible API version is detected.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
tools/power/x86/intel-speed-select/isst-config.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index bd9f7a1d385e..afef3af8b446 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -82,6 +82,11 @@ struct cpu_topology {
static int read_only;
+static void print_version(void)
+{
+ fprintf(outf, "Version %s\n", version_str);
+}
+
static void check_privilege(void)
{
if (!read_only)
@@ -1137,6 +1142,7 @@ static int isst_fill_platform_info(void)
close(fd);
if (isst_platform_info.api_version > supported_api_ver) {
+ print_version();
printf("Incompatible API versions; Upgrade of tool is required\n");
exit(1);
}
@@ -3194,12 +3200,6 @@ static void usage(void)
exit(0);
}
-static void print_version(void)
-{
- fprintf(outf, "Version %s\n", version_str);
- exit(0);
-}
-
static void cmdline(int argc, char **argv)
{
const char *pathname = "/dev/isst_interface";
@@ -3311,6 +3311,7 @@ static void cmdline(int argc, char **argv)
break;
case 'v':
print_version();
+ exit(0);
break;
case 'b':
oob_mode = 1;
--
2.43.0
next prev parent reply other threads:[~2026-03-19 5:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 5:52 [PATCH 1/3] tools/power/x86/intel-speed-select: Fix some program return value Zhang Rui
2026-03-19 5:52 ` Zhang Rui [this message]
2026-03-19 5:52 ` [PATCH 3/3] tools/power/x86/intel-speed-select: Fix output when running on unsupported CLX platforms Zhang Rui
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=20260319055256.3226034-2-rui.zhang@intel.com \
--to=rui.zhang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=srinivas.pandruvada@intel.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
all inboxes | Powered by JetHome®