Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 3e1f12c

Browse files
Romeusshuahkh
authored andcommitted
cpupower: Change the var type of the 'monitor' subcommand display mode
There is a type 'enum operation_mode_e' contains the display modes of the 'monitor' subcommand. This type isn't used though, instead the variable 'mode' is of a simple 'int' type. Change 'mode' variable type from 'int' to 'enum operation_mode_e' in order to improve compiler type checking. Built and tested this with different monitor cmdline params. Everything works as expected, that is nothing changed and no regressions encountered. Signed-off-by: Roman Storozhenko <romeusmeister@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent a286db9 commit 3e1f12c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static unsigned int avail_monitors;
3535
static char *progname;
3636

3737
enum operation_mode_e { list = 1, show, show_all };
38-
static int mode;
38+
static enum operation_mode_e mode;
3939
static int interval = 1;
4040
static char *show_monitors_param;
4141
static struct cpupower_topology cpu_top;

0 commit comments

Comments
 (0)