[U-Boot] [PATCH v3 00/10] sunxi: Bug fixes, sun4i and sun5i support and network improvements

Hans de Goede hdegoede at redhat.com
Tue Jul 8 09:48:52 CEST 2014


Hi,

On 07/07/2014 10:23 PM, Ian Campbell wrote:
> On Mon, 2014-07-07 at 12:47 -0400, Tom Rini wrote:
>> That's not how we like things to look however when we can help it.  Just
>> toss a __maybe_unused in front of the declaration (and make sure we have
>> <linux/compiler.h> included.
> 
> OK. How about the following?
> 
> Hans, BTW, I spotted this issue with:
>         CROSS_COMPILE=arm-linux-gnueabihf- ./MAKEALL -s sunxi
> which is a very useful invocation indeed!

Indeed, I've saved it for future reference.

Regards,

Hans


> 
> 8<-------------------
> 
> From 5e0659b772380114a9e86624aefd1dcb09a90bd9 Mon Sep 17 00:00:00 2001
> From: Ian Campbell <ijc at hellion.org.uk>
> Date: Sun, 6 Jul 2014 20:03:20 +0100
> Subject: [PATCH] sunxi: Avoid unused variable warning.
> 
> Mark rc as __maybe_unused since it is infact unused on systems with neither
> EMAC nor GMAC.
> 
> Signed-off-by: Ian Campbell <ijc at hellion.org.uk>
> ---
>  arch/arm/cpu/armv7/sunxi/board.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
> index 1e506b5..538ffa7 100644
> --- a/arch/arm/cpu/armv7/sunxi/board.c
> +++ b/arch/arm/cpu/armv7/sunxi/board.c
> @@ -24,6 +24,8 @@
>  #include <asm/arch/sys_proto.h>
>  #include <asm/arch/timer.h>
>  
> +#include <linux/compiler.h>
> +
>  #ifdef CONFIG_SPL_BUILD
>  /* Pointer to the global data structure for SPL */
>  DECLARE_GLOBAL_DATA_PTR;
> @@ -115,7 +117,7 @@ void enable_caches(void)
>   */
>  int cpu_eth_init(bd_t *bis)
>  {
> -	int rc;
> +	__maybe_unused int rc;
>  
>  #ifdef CONFIG_SUNXI_EMAC
>  	rc = sunxi_emac_initialize(bis);
> 


More information about the U-Boot mailing list