Skip to content

Commit 5db37b1

Browse files
alexanderwachtercfriedt
authored andcommitted
drivers: hwinfo: shell: rename args to satisfy rule 5.7
This commit changes the shell argument name from shell to sh to satisfy the warning "Violation to rule 5.7 (Tag name should be unique) tag: shell" Signed-off-by: Alexander Wachter <[email protected]>
1 parent c817a09 commit 5db37b1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/hwinfo/hwinfo_shell.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <zephyr/types.h>
1111
#include <logging/log.h>
1212

13-
static int cmd_get_device_id(const struct shell *shell, size_t argc, char **argv)
13+
static int cmd_get_device_id(const struct shell *sh, size_t argc, char **argv)
1414
{
1515
uint8_t dev_id[16];
1616
ssize_t length;
@@ -19,21 +19,21 @@ static int cmd_get_device_id(const struct shell *shell, size_t argc, char **argv
1919
length = hwinfo_get_device_id(dev_id, sizeof(dev_id));
2020

2121
if (length == -ENOTSUP) {
22-
shell_error(shell, "Not supported by hardware");
22+
shell_error(sh, "Not supported by hardware");
2323
return -ENOTSUP;
2424
} else if (length < 0) {
25-
shell_error(shell, "Error: %zd", length);
25+
shell_error(sh, "Error: %zd", length);
2626
return length;
2727
}
2828

29-
shell_fprintf(shell, SHELL_NORMAL, "Length: %zd\n", length);
30-
shell_fprintf(shell, SHELL_NORMAL, "ID: 0x");
29+
shell_fprintf(sh, SHELL_NORMAL, "Length: %zd\n", length);
30+
shell_fprintf(sh, SHELL_NORMAL, "ID: 0x");
3131

3232
for (i = 0 ; i < length ; i++) {
33-
shell_fprintf(shell, SHELL_NORMAL, "%02x", dev_id[i]);
33+
shell_fprintf(sh, SHELL_NORMAL, "%02x", dev_id[i]);
3434
}
3535

36-
shell_fprintf(shell, SHELL_NORMAL, "\n");
36+
shell_fprintf(sh, SHELL_NORMAL, "\n");
3737

3838
return 0;
3939
}

0 commit comments

Comments
 (0)