diff options
author | Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> | 2022-09-26 12:22:42 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@amd.com> | 2022-10-05 11:36:54 +0200 |
commit | e1a193b95177fb5325c07fa85810f640a8ed8687 (patch) | |
tree | 45adfd80fbdafb8fafaa612d6d9e19203d0a7c3b | |
parent | f4cf004d273523494bb276c3317c0c8f17a48c59 (diff) | |
download | u-boot-e1a193b95177fb5325c07fa85810f640a8ed8687.zip u-boot-e1a193b95177fb5325c07fa85810f640a8ed8687.tar.gz u-boot-e1a193b95177fb5325c07fa85810f640a8ed8687.tar.bz2 |
xilinx: common: Fix static checker warnings
Avoid signed extension for uuid and byte.
Eliminate the below smatch warnings:
board/xilinx/common/board.c:128 xilinx_eeprom_legacy_cleanup()
warn: impossible condition '(byte == 255) => ((-128)-127 == 255)'
board/xilinx/common/board.c:466 board_late_init_xilinx()
warn: argument 3 to %02x specifier has type 'char'
board/xilinx/common/board.c:466 board_late_init_xilinx()
warn: argument 4 to %02x specifier has type 'char'
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20220926065242.4355-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
-rw-r--r-- | board/xilinx/common/board.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 391ce4d..bbfe84b 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -121,7 +121,7 @@ struct xilinx_legacy_format { static void xilinx_eeprom_legacy_cleanup(char *eeprom, int size) { int i; - char byte; + unsigned char byte; for (i = 0; i < size; i++) { byte = eeprom[i]; @@ -460,8 +460,8 @@ int board_late_init_xilinx(void) desc->serial); if (desc->uuid[0]) { - char uuid[UUID_STR_LEN + 1]; - char *t = desc->uuid; + unsigned char uuid[UUID_STR_LEN + 1]; + unsigned char *t = desc->uuid; memset(uuid, 0, UUID_STR_LEN + 1); |