All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH 3/3] can: af_can: fix sparse warning for can_rx_alldev_list
Date: Wed, 20 Jun 2012 17:46:56 +0200	[thread overview]
Message-ID: <4FE1F070.4060305@hartkopp.net> (raw)
In-Reply-To: <4FE1830A.3020605@pengutronix.de>

On 20.06.2012 10:00, Marc Kleine-Budde wrote:

> On 06/20/2012 05:39 AM, Oliver Hartkopp wrote:
>> On 19.06.2012 22:05, Marc Kleine-Budde wrote:

>> Is there no way to satisfy the sparse warning in another way?
> 
> Yes, don't use extern, put it into af_can.h.
>


So this would fix the sparse warning then?

diff --git a/net/can/af_can.h b/net/can/af_can.h
index fd882db..1dccb4c 100644
--- a/net/can/af_can.h
+++ b/net/can/af_can.h
@@ -104,6 +104,9 @@ struct s_pstats {
 	unsigned long rcv_entries_max;
 };

+/* receive filters subscribed for 'all' CAN devices */
+extern struct dev_rcv_lists can_rx_alldev_list;
+
 /* function prototypes for the CAN networklayer procfs (proc.c) */
 extern void can_init_proc(void);
 extern void can_remove_proc(void);
diff --git a/net/can/proc.c b/net/can/proc.c
index ba873c3..3b6dd31 100644
--- a/net/can/proc.c
+++ b/net/can/proc.c
@@ -83,9 +83,6 @@ static const char rx_list_name[][8] = {
 	[RX_EFF] = "rx_eff",
 };

-/* receive filters subscribed for 'all' CAN devices */
-extern struct dev_rcv_lists can_rx_alldev_list;
-
 /*
  * af_can statistics stuff
  */




  reply	other threads:[~2012-06-20 15:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19 20:05 [PATCH 0/3] sparse fixes Marc Kleine-Budde
2012-06-19 20:05 ` [PATCH 1/3] can: cc770: fix sparse warning for cc770_interrupt Marc Kleine-Budde
2012-06-19 20:05 ` [PATCH 2/3] can: dev: fix sparse warning for can_restart Marc Kleine-Budde
2012-06-19 20:05 ` [PATCH 3/3] can: af_can: fix sparse warning for can_rx_alldev_list Marc Kleine-Budde
2012-06-20  3:39   ` Oliver Hartkopp
2012-06-20  8:00     ` Marc Kleine-Budde
2012-06-20 15:46       ` Oliver Hartkopp [this message]
2012-06-20 16:05         ` Marc Kleine-Budde
2012-06-20 16:06           ` Oliver Hartkopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE1F070.4060305@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.