[U-Boot] arm: zynq: Fix types in ps7_spl_init

Message ID 155aab9084c8317e5264da3d70f086a835420b1d.1515763652.git.michal.simek@xilinx.com
State New
Delegated to: Michal Simek
Headers show
Series
  • [U-Boot] arm: zynq: Fix types in ps7_spl_init
Related show

Commit Message

Michal Simek Jan. 12, 2018, 1:27 p.m.
The patch is fixing the following Warning:
arch/arm/mach-zynq/ps7_spl_init.c:133:24: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
    while (ioread(addr) < delay)
                        ^

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/arm/mach-zynq/ps7_spl_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/arm/mach-zynq/ps7_spl_init.c b/arch/arm/mach-zynq/ps7_spl_init.c
index 6dc4e0364d8b..ba2dad759ca8 100644
--- a/arch/arm/mach-zynq/ps7_spl_init.c
+++ b/arch/arm/mach-zynq/ps7_spl_init.c
@@ -58,7 +58,7 @@  static void perf_start_clock(void)
 }
 
 /* Compute mask for given delay in miliseconds*/
-static int get_number_of_cycles_for_delay(unsigned int delay)
+static unsigned long get_number_of_cycles_for_delay(unsigned long delay)
 {
 	return (APU_FREQ / (2 * 1000)) * delay;
 }
@@ -92,7 +92,7 @@  int __weak ps7_config(unsigned long *ps7_config_init)
 	unsigned long mask;
 	unsigned int numargs;
 	int i;
-	int delay;
+	unsigned long delay;
 
 	for (;;) {
 		opcode = ptr[0];