From 09e3123257d708a59e3ae110f628ecbae74b49db Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 14 Oct 2021 20:57:27 +0000 Subject: 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 Change-Id: I0ac46358b6fbafa65504c648ce4de0365cdbf723 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3224372 Reviewed-by: Daisuke Nojiri --- include/console.h | 7 ++++--- include/temp_sensor.h | 7 ++----- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'include') 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 */ -- cgit v1.2.1