diff mbox

can: fix sparse warning for cgw_list

Message ID 1332716750-3455-1-git-send-email-dbaluta@ixiacom.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Daniel Baluta March 25, 2012, 11:05 p.m. UTC
From: Daniel Baluta <daniel.baluta@gmail.com>

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 <dbaluta@ixiacom.com>
---
 net/can/gw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Oliver Hartkopp March 26, 2012, 4:04 a.m. UTC | #1
On 26.03.2012 01:05, dbaluta@ixiacom.com wrote:

> From: Daniel Baluta <daniel.baluta@gmail.com>
> 
> 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 <dbaluta@ixiacom.com>


Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>



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 <oliver.hartkopp@volkswagen.de>");
>  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;


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marc Kleine-Budde March 26, 2012, 8:19 a.m. UTC | #2
On 03/26/2012 01:05 AM, dbaluta@ixiacom.com wrote:
> From: Daniel Baluta <daniel.baluta@gmail.com>
> 
> 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 <dbaluta@ixiacom.com>

Thanks, applied to can-next.

Marc
Oliver Hartkopp April 3, 2012, 4 p.m. UTC | #3
On 26.03.2012 10:19, Marc Kleine-Budde wrote:

> On 03/26/2012 01:05 AM, dbaluta@ixiacom.com wrote:
>> From: Daniel Baluta <daniel.baluta@gmail.com>
>>
>> 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 <dbaluta@ixiacom.com>
> 
> Thanks, applied to can-next.
> 


Hi Marc,

it looks like that this patch is still sitting in can-next.

What about a pull request for Daves net-tree for 3.4-rc1 ?

Regards,
Oliver
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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 <oliver.hartkopp@volkswagen.de>");
 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;