Skip to content

Commit 7a59ebf

Browse files
ndrs-pstnashif
authored andcommitted
drivers: i3c: shell: use shell_fprintf_normal instead of shell_fprintf
Due to the introduction of `shell_fprintf_normal` in PR #77192, we can minimize caller overhead by eliminating direct `color` parameter passing. Signed-off-by: Pisit Sawangvonganan <[email protected]>
1 parent d539257 commit 7a59ebf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/i3c/i3c_shell.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,10 +1944,10 @@ static int cmd_i3c_i2c_scan(const struct shell *sh, size_t argc, char **argv)
19441944

19451945
shell_print(sh, " 0 1 2 3 4 5 6 7 8 9 a b c d e f");
19461946
for (uint8_t i = 0; i <= last; i += 16) {
1947-
shell_fprintf(sh, SHELL_NORMAL, "%02x: ", i);
1947+
shell_fprintf_normal(sh, "%02x: ", i);
19481948
for (uint8_t j = 0; j < 16; j++) {
19491949
if (i + j < first || i + j > last) {
1950-
shell_fprintf(sh, SHELL_NORMAL, " ");
1950+
shell_fprintf_normal(sh, " ");
19511951
continue;
19521952
}
19531953

@@ -1974,10 +1974,10 @@ static int cmd_i3c_i2c_scan(const struct shell *sh, size_t argc, char **argv)
19741974
msgs[0].len = 0U;
19751975
msgs[0].flags = I2C_MSG_WRITE | I2C_MSG_STOP;
19761976
if (i2c_transfer(dev, &msgs[0], 1, i + j) == 0) {
1977-
shell_fprintf(sh, SHELL_NORMAL, "%02x ", i + j);
1977+
shell_fprintf_normal(sh, "%02x ", i + j);
19781978
++cnt;
19791979
} else {
1980-
shell_fprintf(sh, SHELL_NORMAL, "-- ");
1980+
shell_fprintf_normal(sh, "-- ");
19811981
}
19821982

19831983
ret = i3c_detach_i2c_device(&desc);
@@ -1987,13 +1987,13 @@ static int cmd_i3c_i2c_scan(const struct shell *sh, size_t argc, char **argv)
19871987
desc.addr);
19881988
}
19891989
} else if (slot == I3C_ADDR_SLOT_STATUS_I3C_DEV) {
1990-
shell_fprintf(sh, SHELL_NORMAL, "I3 ");
1990+
shell_fprintf_normal(sh, "I3 ");
19911991
} else if (slot == I3C_ADDR_SLOT_STATUS_I2C_DEV) {
1992-
shell_fprintf(sh, SHELL_NORMAL, "I2 ");
1992+
shell_fprintf_normal(sh, "I2 ");
19931993
} else if (slot == I3C_ADDR_SLOT_STATUS_RSVD) {
1994-
shell_fprintf(sh, SHELL_NORMAL, "RS ");
1994+
shell_fprintf_normal(sh, "RS ");
19951995
} else {
1996-
shell_fprintf(sh, SHELL_NORMAL, "-- ");
1996+
shell_fprintf_normal(sh, "-- ");
19971997
}
19981998
}
19991999
shell_print(sh, "");

0 commit comments

Comments
 (0)