Re: [U-Boot] [PATCH 1/3] arm64: zynqmp: xil_io.h: declare functions as static

2019-05-23 Thread Luca Ceresoli
Hi,

On 22/05/19 13:26, Michal Simek wrote:
> On 10. 05. 19 10:15, Luca Ceresoli wrote:
>> Fixes chekcpatch warnings when building zynqmp defconfigs:
> 
> it is not checkpatch who reports this. It is sparse.

Good catch, will fix.

-- 
Luca
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] arm64: zynqmp: xil_io.h: declare functions as static

2019-05-22 Thread Michal Simek
On 10. 05. 19 10:15, Luca Ceresoli wrote:
> Fixes chekcpatch warnings when building zynqmp defconfigs:

it is not checkpatch who reports this. It is sparse.

>   ./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 
> ---
>  board/xilinx/zynqmp/xil_io.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/board/xilinx/zynqmp/xil_io.h b/board/xilinx/zynqmp/xil_io.h
> index c476c902ebcb..1c1bf32adaae 100644
> --- a/board/xilinx/zynqmp/xil_io.h
> +++ b/board/xilinx/zynqmp/xil_io.h
> @@ -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);
>  }
> 

The rest looks good.

Thanks,
Michal

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/3] arm64: zynqmp: xil_io.h: declare functions as static

2019-05-10 Thread Luca Ceresoli
Fixes chekcpatch 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 
---
 board/xilinx/zynqmp/xil_io.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/xilinx/zynqmp/xil_io.h b/board/xilinx/zynqmp/xil_io.h
index c476c902ebcb..1c1bf32adaae 100644
--- a/board/xilinx/zynqmp/xil_io.h
+++ b/board/xilinx/zynqmp/xil_io.h
@@ -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);
 }
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot