diff options
author | Caveh Jalali <caveh@chromium.org> | 2022-08-30 00:03:12 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-01 22:41:45 +0000 |
commit | 2e864b253903b8fbcfa509113be2407e76daea2e (patch) | |
tree | e383593749ba7d726dcdb45e30c2098a47bb4a05 /common/keyboard_8042.c | |
parent | 76789c78aff4a73c2dc0aca526267714fffb075b (diff) | |
download | chrome-ec-2e864b253903b8fbcfa509113be2407e76daea2e.tar.gz |
tree-wide: const-ify argv for console commands
This updates the API for console commands
from "int cmd(int argc, char **argv)"
to "int cmd(int argc, const char **argv)"
which is more accurate and in line with common convention.
BRANCH=none
BUG=b:244387210
TEST="make buildall" passes
TEST="zmake build -a" passes
TEST="util/compare_build.sh -b all" passes
TEST="./twister -v -T zephyr/test" passes
Cq-Depend: chrome-internal:4960125
Cq-Depend: chrome-internal:4959932
Change-Id: I57de9f35b85b8f3c7119df36aefb2abf25d2625f
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863941
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/keyboard_8042.c')
-rw-r--r-- | common/keyboard_8042.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/common/keyboard_8042.c b/common/keyboard_8042.c index bf1d3f3c2e..013c230094 100644 --- a/common/keyboard_8042.c +++ b/common/keyboard_8042.c @@ -1049,7 +1049,7 @@ test_mockable void keyboard_update_button(enum keyboard_button_type button, /*****************************************************************************/ /* Console commands */ #ifdef CONFIG_CMD_KEYBOARD -static int command_typematic(int argc, char **argv) +static int command_typematic(int argc, const char **argv) { int i; @@ -1071,7 +1071,7 @@ static int command_typematic(int argc, char **argv) return EC_SUCCESS; } -static int command_codeset(int argc, char **argv) +static int command_codeset(int argc, const char **argv) { if (argc == 2) { int set = strtoi(argv[1], NULL, 0); @@ -1090,7 +1090,7 @@ static int command_codeset(int argc, char **argv) return EC_SUCCESS; } -static int command_controller_ram(int argc, char **argv) +static int command_controller_ram(int argc, const char **argv) { int index; @@ -1108,7 +1108,7 @@ static int command_controller_ram(int argc, char **argv) return EC_SUCCESS; } -static int command_keyboard_log(int argc, char **argv) +static int command_keyboard_log(int argc, const char **argv) { int i; @@ -1151,7 +1151,7 @@ static int command_keyboard_log(int argc, char **argv) return EC_SUCCESS; } -static int command_keyboard(int argc, char **argv) +static int command_keyboard(int argc, const char **argv) { int ena; @@ -1166,7 +1166,7 @@ static int command_keyboard(int argc, char **argv) return EC_SUCCESS; } -static int command_8042_internal(int argc, char **argv) +static int command_8042_internal(int argc, const char **argv) { int i; @@ -1223,7 +1223,7 @@ DECLARE_CONSOLE_COMMAND(kbd, command_keyboard, "[on | off]", "Print or toggle keyboard info"); #endif -static int command_8042(int argc, char **argv) +static int command_8042(int argc, const char **argv) { if (argc >= 2) { if (!strcasecmp(argv[1], "internal")) @@ -1241,7 +1241,7 @@ static int command_8042(int argc, char **argv) else return EC_ERROR_PARAM1; } else { - char *ctlram_argv[] = { "ctrlram", "0" }; + const char *ctlram_argv[] = { "ctrlram", "0" }; ccprintf("\n- Typematic:\n"); command_typematic(argc, argv); |