diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-10-14 20:57:27 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-15 23:40:38 +0000 |
commit | 09e3123257d708a59e3ae110f628ecbae74b49db (patch) | |
tree | 71d96fd934d4b3290e62222d69e7f079e6c5b8d7 /include | |
parent | 0888fe2d3e01b379ca8024d09f24fd89b3d49acf (diff) | |
download | chrome-ec-09e3123257d708a59e3ae110f628ecbae74b49db.tar.gz |
tree: Make all console commands static
Almost all of the console commands were already static. This change
makes all of them static for consistency.
BRANCH=none
BUG=b:172020503
TEST=make buildall -j
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I0ac46358b6fbafa65504c648ce4de0365cdbf723
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3224372
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/console.h | 7 | ||||
-rw-r--r-- | include/temp_sensor.h | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/include/console.h b/include/console.h index 5bb1f2541f..34dba9c5ed 100644 --- a/include/console.h +++ b/include/console.h @@ -221,11 +221,11 @@ void console_has_input(void); */ #if !defined(HAS_TASK_CONSOLE) && !defined(CONFIG_ZEPHYR) #define DECLARE_CONSOLE_COMMAND(NAME, ROUTINE, ARGDESC, HELP) \ - int (ROUTINE)(int argc, char **argv) __attribute__((unused)) + static int (ROUTINE)(int argc, char **argv) __attribute__((unused)) #define DECLARE_SAFE_CONSOLE_COMMAND(NAME, ROUTINE, ARGDESC, HELP) \ - int (ROUTINE)(int argc, char **argv) __attribute__((unused)) + static int (ROUTINE)(int argc, char **argv) __attribute__((unused)) #define DECLARE_CONSOLE_COMMAND_FLAGS(NAME, ROUTINE, ARGDESC, HELP, FLAGS) \ - int (ROUTINE)(int argc, char **argv) __attribute__((unused)) + static int (ROUTINE)(int argc, char **argv) __attribute__((unused)) #elif defined(HAS_TASK_CONSOLE) /* We always provde help args, but we may discard them to save space. */ @@ -247,6 +247,7 @@ void console_has_input(void); /* This macro takes all possible args and discards the ones we don't use */ #define _DCL_CON_CMD_ALL(NAME, ROUTINE, ARGDESC, HELP, FLAGS) \ + static int (ROUTINE)(int argc, char **argv); \ static const char __con_cmd_label_##NAME[] = #NAME; \ _Static_assert(sizeof(__con_cmd_label_##NAME) < 16, \ "command name '" #NAME "' is too long"); \ diff --git a/include/temp_sensor.h b/include/temp_sensor.h index 50a174193f..cf04760e67 100644 --- a/include/temp_sensor.h +++ b/include/temp_sensor.h @@ -68,13 +68,10 @@ extern const struct temp_sensor_t temp_sensors[]; int temp_sensor_read(enum temp_sensor_id id, int *temp_ptr); /** - * Console command to print temperature sensor values - * - * @param argc argument count (Set argc = 1) - * @param argv argument vector (Set argv = NULL) + * Print all temperature sensor values. * * @return EC_SUCCESS, or non-zero if error. */ -int console_command_temps(int argc, char **argv); +int print_temps(void); #endif /* __CROS_EC_TEMP_SENSOR_H */ |