]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm64: zynqmp: xil_io.h: declare functions as static
authorLuca Ceresoli <luca@lucaceresoli.net>
Fri, 24 May 2019 13:40:01 +0000 (15:40 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 30 Jul 2019 08:20:06 +0000 (10:20 +0200)
Fixes sparse warnings when building zynqmp defconfigs:
  ./board/xilinx/zynqmp/xil_io.h:12:6: warning: symbol 'Xil_Out32' was not declared. Should it be static?
  ./board/xilinx/zynqmp/xil_io.h:17:5: warning: symbol 'Xil_In32' was not declared. Should it be static?
  ./board/xilinx/zynqmp/xil_io.h:22:6: warning: symbol 'usleep' was not declared. Should it be static?

Also add __maybe_unused to usleep() since it is not used by minimized
psu_init_gpl.c files, so it would warn as "defined but not used".

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynqmp/xil_io.h

index c476c902ebcbd4b62d5fb682fb4da2ee0f681b94..1c1bf32adaae14127d6628e7338f7a1a1080da67 100644 (file)
@@ -9,17 +9,17 @@
 
 #define xil_printf(...)
 
-void Xil_Out32(unsigned long addr, unsigned long val)
+static void Xil_Out32(unsigned long addr, unsigned long val)
 {
        writel(val, addr);
 }
 
-int Xil_In32(unsigned long addr)
+static int Xil_In32(unsigned long addr)
 {
        return readl(addr);
 }
 
-void usleep(u32 sleep)
+static void __maybe_unused usleep(u32 sleep)
 {
        udelay(sleep);
 }