shell: Remove unnecessary function
The print_cmd_unknown() is just a two-liner and only called from a
single place, so just do the printk calls inline.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c
index 7016ef6..791fece 100644
--- a/subsys/shell/shell.c
+++ b/subsys/shell/shell.c
@@ -314,12 +314,6 @@
return NULL;
}
-static inline void print_cmd_unknown(char *argv)
-{
- printk("Unrecognized command: %s\n", argv);
- printk("Type 'help' for list of available commands\n");
-}
-
static shell_cmd_function_t get_internal(const char *command)
{
if (!strcmp(command, "help")) {
@@ -379,7 +373,8 @@
if (app_cmd_handler != NULL) {
cb = app_cmd_handler;
} else {
- print_cmd_unknown(argv[0]);
+ printk("Unrecognized command: %s\n", argv[0]);
+ printk("Type 'help' for list of available commands\n");
return -EINVAL;
}
}