]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: zynqmp: change the type of multiboot variable
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Tue, 4 Oct 2022 05:52:54 +0000 (11:22 +0530)
committerMichal Simek <michal.simek@amd.com>
Mon, 10 Oct 2022 10:28:08 +0000 (12:28 +0200)
In function ‘set_dfu_alt_info’ a comparison of a u8 value against
0 is done. Since it is always false, change the signature of this
function to use an `int` instead, which match the type used in caller:
`multi_boot()`.

Fix the following warning triggered with W=1:

board/xilinx/zynqmp/zynqmp.c:651:23:
warning: comparison is always false due to limited range of data type
[-Wtype-limits]
651 |         if (multiboot < 0)

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20221004055254.26246-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
board/xilinx/zynqmp/zynqmp.c

index 62537760dfa1fa0fd8bb84152e0980b893d9fa25..8188e76dd84462402d74a4b02225907f70f3184e 100644 (file)
@@ -607,7 +607,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
 
 void set_dfu_alt_info(char *interface, char *devstr)
 {
-       u8 multiboot;
+       int multiboot;
        int bootseq = 0;
 
        ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN);