tools/power/x86/intel-speed-select: Introduce is_debug_enabled()
authorZhang Rui <rui.zhang@intel.com>
Mon, 8 Aug 2022 17:56:04 +0000 (01:56 +0800)
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 22 Mar 2023 20:36:52 +0000 (13:36 -0700)
Platform specific code also needs to give debug output.
Introduce is_debug_enabled() for this purpose.

No functional changes are expected.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[srinivas.pandruvada@linux.intel.com: changelog edits]
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
tools/power/x86/intel-speed-select/isst-config.c
tools/power/x86/intel-speed-select/isst.h

index fb83f74..591fe30 100644 (file)
@@ -77,6 +77,11 @@ FILE *get_output_file(void)
        return outf;
 }
 
+int is_debug_enabled(void)
+{
+       return debug_flag;
+}
+
 void debug_printf(const char *format, ...)
 {
        va_list args;
index 6839ad2..b3bf989 100644 (file)
@@ -216,6 +216,7 @@ extern int get_max_punit_core_id(struct isst_id *id);
 
 /* Common interfaces */
 FILE *get_output_file(void);
+extern int is_debug_enabled(void);
 extern void debug_printf(const char *format, ...);
 extern int out_format_is_json(void);
 extern void set_isst_id(struct isst_id *id, int cpu);