[PATCH 02/15] ARM: socfpga: Fix timeout tests
Sascha Hauer
s.hauer at pengutronix.de
Mon May 17 11:54:11 PDT 2021
A timeout is never detected as timeout is tested for being smaller than
0 which never happens for an unsigned variable. Change to a signed type.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-socfpga/arria10-xload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-socfpga/arria10-xload.c b/arch/arm/mach-socfpga/arria10-xload.c
index 6f137e300e..e52fd1ed87 100644
--- a/arch/arm/mach-socfpga/arria10-xload.c
+++ b/arch/arm/mach-socfpga/arria10-xload.c
@@ -136,7 +136,7 @@ static int a10_fpga_init(void *buf)
{
uint32_t stat, mask;
uint32_t val;
- uint32_t timeout;
+ int timeout;
val = CFGWDTH_32 << A10_FPGAMGR_IMGCFG_CTL_02_CFGWIDTH_SHIFT;
a10_update_bits(A10_FPGAMGR_IMGCFG_CTL_02_OFST,
--
2.29.2
More information about the barebox
mailing list