]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cpupower: Change the var type of the 'monitor' subcommand display mode
authorRoman Storozhenko <romeusmeister@gmail.com>
Thu, 20 Jun 2024 15:57:23 +0000 (17:57 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 20 Jun 2024 16:08:08 +0000 (10:08 -0600)
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>
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c

index 075e766ff1f3001732524c9817a491f3882e2993..f746099b5dacbffb30435df26c21a46ed3dd96c8 100644 (file)
@@ -35,7 +35,7 @@ static unsigned int avail_monitors;
 static char *progname;
 
 enum operation_mode_e { list = 1, show, show_all };
-static int mode;
+static enum operation_mode_e mode;
 static int interval = 1;
 static char *show_monitors_param;
 static struct cpupower_topology cpu_top;