u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] xilinx: zynqmp: change the type of multiboot variable
@ 2022-10-04  5:52 Venkatesh Yadav Abbarapu
  2022-10-07  9:48 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Venkatesh Yadav Abbarapu @ 2022-10-04  5:52 UTC (permalink / raw)
  To: u-boot; +Cc: michal.simek, git

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>
---

 board/xilinx/zynqmp/zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 57259b60a0..81f551ee99 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -636,7 +636,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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xilinx: zynqmp: change the type of multiboot variable
  2022-10-04  5:52 [PATCH] xilinx: zynqmp: change the type of multiboot variable Venkatesh Yadav Abbarapu
@ 2022-10-07  9:48 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2022-10-07  9:48 UTC (permalink / raw)
  To: Venkatesh Yadav Abbarapu, u-boot; +Cc: git



On 10/4/22 07:52, Venkatesh Yadav Abbarapu wrote:
> 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>
> ---
> 
>   board/xilinx/zynqmp/zynqmp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index 57259b60a0..81f551ee99 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -636,7 +636,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);


Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-07  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04  5:52 [PATCH] xilinx: zynqmp: change the type of multiboot variable Venkatesh Yadav Abbarapu
2022-10-07  9:48 ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).