Skip to content

Commit

Permalink
drivers: can: shell: properly sort mode table entries
Browse files Browse the repository at this point in the history
Properly sort the entries in the can_mode_t translation table.

Signed-off-by: Henrik Brix Andersen <[email protected]>
  • Loading branch information
henrikbrixandersen authored and aescolar committed Mar 11, 2024
1 parent 75c9f0f commit 6fa13e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/can/can_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ struct can_shell_mode_mapping {
#define CAN_SHELL_MODE_MAPPING(_name, _mode) { .name = _name, .mode = _mode }

static const struct can_shell_mode_mapping can_shell_mode_map[] = {
/* Array sorted alphabetically based on name */
/* zephyr-keep-sorted-start */
CAN_SHELL_MODE_MAPPING("fd", CAN_MODE_FD),
CAN_SHELL_MODE_MAPPING("listen-only", CAN_MODE_LISTENONLY),
CAN_SHELL_MODE_MAPPING("loopback", CAN_MODE_LOOPBACK),
CAN_SHELL_MODE_MAPPING("manual-recovery", CAN_MODE_MANUAL_RECOVERY),
CAN_SHELL_MODE_MAPPING("normal", CAN_MODE_NORMAL),
CAN_SHELL_MODE_MAPPING("one-shot", CAN_MODE_ONE_SHOT),
CAN_SHELL_MODE_MAPPING("triple-sampling", CAN_MODE_3_SAMPLES),
CAN_SHELL_MODE_MAPPING("manual-recovery", CAN_MODE_MANUAL_RECOVERY),
/* zephyr-keep-sorted-stop */
};

K_MSGQ_DEFINE(can_shell_tx_msgq, sizeof(struct can_shell_tx_event),
Expand Down

0 comments on commit 6fa13e2

Please sign in to comment.