* [PATCH v2] cpupower: Change the var type of the 'monitor' subcommand display mode
@ 2024-06-20 15:57 Roman Storozhenko
2024-06-20 17:23 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: Roman Storozhenko @ 2024-06-20 15:57 UTC (permalink / raw)
To: Thomas Renninger, Shuah Khan
Cc: Javier Carrasco, linux-pm, linux-kernel, Roman Storozhenko
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>
---
Changes in v2:
- Moved cover letter content to the change log
- Link to v1: https://lore.kernel.org/r/20240619-change-mode-type-v1-1-31e7e45028f0@gmail.com
---
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
index 075e766ff1f3..f746099b5dac 100644
--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
@@ -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;
---
base-commit: 0c52056d9f77508cb6d4d68d3fc91c6c08ec71af
change-id: 20240619-change-mode-type-e8de8430ccca
Best regards,
--
Roman Storozhenko <romeusmeister@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] cpupower: Change the var type of the 'monitor' subcommand display mode
2024-06-20 15:57 [PATCH v2] cpupower: Change the var type of the 'monitor' subcommand display mode Roman Storozhenko
@ 2024-06-20 17:23 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2024-06-20 17:23 UTC (permalink / raw)
To: Roman Storozhenko, Thomas Renninger, Shuah Khan
Cc: Javier Carrasco, linux-pm, linux-kernel, Shuah Khan
On 6/20/24 09:57, Roman Storozhenko wrote:
> 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>
> ---
> Changes in v2:
> - Moved cover letter content to the change log
> - Link to v1: https://lore.kernel.org/r/20240619-change-mode-type-v1-1-31e7e45028f0@gmail.com
Applied for Linux 6.11-rc1
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=cpupower
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-20 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20 15:57 [PATCH v2] cpupower: Change the var type of the 'monitor' subcommand display mode Roman Storozhenko
2024-06-20 17:23 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).