Subject: Re: [PATCH] can: fix sparse warning for cgw_list

From: Oliver Hartkopp <[email-masked]>
Date: Mon, 26 Mar 2012 06:04:40 +0200

On 26.03.2012 01:05, [email-masked] wrote:

> From: Daniel Baluta <[email-masked]>
> 
> Make cgw_list static to remove the following sparse warning:
> net/can/gw.c:69:1: warning: symbol 'cgw_list' was not declared.
> Should it be static?
> 
> Signed-off-by: Daniel Baluta <[email-masked]>

Acked-by: Oliver Hartkopp <[email-masked]>

Hello Daniel,

cgw_list is indeed only a local structure. Don't know why i didn't declare it
to be static. If it silences a sparse warning the better :-)

Thanks,
Oliver

> ---
>  net/can/gw.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/can/gw.c b/net/can/gw.c
> index 3d79b12..b41acf2 100644
> --- a/net/can/gw.c
> +++ b/net/can/gw.c
> @@ -66,7 +66,7 @@ MODULE_LICENSE("Dual BSD/GPL");
>  MODULE_AUTHOR("Oliver Hartkopp <[email-masked]>");
>  MODULE_ALIAS("can-gw");
>  
> -HLIST_HEAD(cgw_list);
> +static HLIST_HEAD(cgw_list);
>  static struct notifier_block notifier;
>  
>  static struct kmem_cache *cgw_cache __read_mostly;