]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: raspberrypi: Fix format specifier for printing rev_scheme
authorFrancois Berder <fberder@outlook.fr>
Tue, 9 Jul 2024 12:20:48 +0000 (14:20 +0200)
committerPeter Robinson <pbrobinson@gmail.com>
Fri, 12 Jul 2024 10:42:30 +0000 (11:42 +0100)
rev_scheme is an unsigned integer and must not be printed
as a signed integer.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
board/raspberrypi/rpi/rpi.c

index 2851ebc985355945335685a6c40711c1ab3eeb84..5db60554b6f4a07c5548c28b4da087fb07a1c974 100644 (file)
@@ -382,7 +382,7 @@ static void set_board_info(void)
 
        snprintf(s, sizeof(s), "0x%X", revision);
        env_set("board_revision", s);
-       snprintf(s, sizeof(s), "%d", rev_scheme);
+       snprintf(s, sizeof(s), "%u", rev_scheme);
        env_set("board_rev_scheme", s);
        /* Can't rename this to board_rev_type since it's an ABI for scripts */
        snprintf(s, sizeof(s), "0x%X", rev_type);