All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] netpoll: Trivial updates
@ 2011-07-01  1:08 Joe Perches
  2011-07-01  1:08 ` [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Joe Perches @ 2011-07-01  1:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: WANG Cong, netdev

cc: WANG Cong <amwang@redhat.com>

Joe Perches (2):
  netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
  netpoll: Remove trivial wrapper function netpoll_poll

 include/linux/netpoll.h |    2 --
 net/core/netpoll.c      |   13 +++----------
 2 files changed, 3 insertions(+), 12 deletions(-)

-- 
1.7.6.rc1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
  2011-07-01  1:08 [PATCH 0/2] netpoll: Trivial updates Joe Perches
@ 2011-07-01  1:08 ` Joe Perches
  2011-07-04  3:02   ` David Miller
  2011-07-04  6:53   ` Harry Wei
  2011-07-01  1:08 ` [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll Joe Perches
  2011-07-01  3:26 ` [PATCH 0/2] netpoll: Trivial updates Cong Wang
  2 siblings, 2 replies; 18+ messages in thread
From: Joe Perches @ 2011-07-01  1:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: WANG Cong, David S. Miller, netdev

Unused symbols waste space.

Commit 0e34e93177fb
"(netpoll: add generic support for bridge and bonding devices)"
added the symbol more than a year ago with the promise of "future use".

Because it is so far unused, remove it for now.
It can be easily readded if or when it actually needs to be used.

cc: WANG Cong <amwang@redhat.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
 include/linux/netpoll.h |    2 --
 net/core/netpoll.c      |    6 ++----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 79358bb..5dfa091 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -40,8 +40,6 @@ struct netpoll_info {
 	struct netpoll *netpoll;
 };
 
-void netpoll_poll_dev(struct net_device *dev);
-void netpoll_poll(struct netpoll *np);
 void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
 void netpoll_print_options(struct netpoll *np);
 int netpoll_parse_options(struct netpoll *np, char *opt);
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 18d9cbd..4ce595e 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -177,7 +177,7 @@ static void service_arp_queue(struct netpoll_info *npi)
 	}
 }
 
-void netpoll_poll_dev(struct net_device *dev)
+static void netpoll_poll_dev(struct net_device *dev)
 {
 	const struct net_device_ops *ops;
 
@@ -208,13 +208,11 @@ void netpoll_poll_dev(struct net_device *dev)
 
 	zap_completion_queue();
 }
-EXPORT_SYMBOL(netpoll_poll_dev);
 
-void netpoll_poll(struct netpoll *np)
+static void netpoll_poll(struct netpoll *np)
 {
 	netpoll_poll_dev(np->dev);
 }
-EXPORT_SYMBOL(netpoll_poll);
 
 static void refill_skbs(void)
 {
-- 
1.7.6.rc1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll
  2011-07-01  1:08 [PATCH 0/2] netpoll: Trivial updates Joe Perches
  2011-07-01  1:08 ` [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev Joe Perches
@ 2011-07-01  1:08 ` Joe Perches
  2011-07-04  3:02   ` David Miller
  2011-07-01  3:26 ` [PATCH 0/2] netpoll: Trivial updates Cong Wang
  2 siblings, 1 reply; 18+ messages in thread
From: Joe Perches @ 2011-07-01  1:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: WANG Cong, David S. Miller, netdev

Too trivial to live.

cc: WANG Cong <amwang@redhat.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
 net/core/netpoll.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 4ce595e..adf84dd 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -209,11 +209,6 @@ static void netpoll_poll_dev(struct net_device *dev)
 	zap_completion_queue();
 }
 
-static void netpoll_poll(struct netpoll *np)
-{
-	netpoll_poll_dev(np->dev);
-}
-
 static void refill_skbs(void)
 {
 	struct sk_buff *skb;
@@ -273,7 +268,7 @@ repeat:
 
 	if (!skb) {
 		if (++count < 10) {
-			netpoll_poll(np);
+			netpoll_poll_dev(np->dev);
 			goto repeat;
 		}
 		return NULL;
@@ -334,7 +329,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
 			}
 
 			/* tickle device maybe there is some cleanup */
-			netpoll_poll(np);
+			netpoll_poll_dev(np->dev);
 
 			udelay(USEC_PER_POLL);
 		}
-- 
1.7.6.rc1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  1:08 [PATCH 0/2] netpoll: Trivial updates Joe Perches
  2011-07-01  1:08 ` [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev Joe Perches
  2011-07-01  1:08 ` [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll Joe Perches
@ 2011-07-01  3:26 ` Cong Wang
  2011-07-01  3:35   ` Joe Perches
  2 siblings, 1 reply; 18+ messages in thread
From: Cong Wang @ 2011-07-01  3:26 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, netdev

于 2011年07月01日 09:08, Joe Perches 写道:
> cc: WANG Cong<amwang@redhat.com>
>
> Joe Perches (2):
>    netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
>    netpoll: Remove trivial wrapper function netpoll_poll
>
>   include/linux/netpoll.h |    2 --
>   net/core/netpoll.c      |   13 +++----------
>   2 files changed, 3 insertions(+), 12 deletions(-)
>

I am fine with patch 1/2, but not 2/2, since it is trivial,
why touch it? With netpoll_poll(), we don't need to explore the
details of struct netpoll, I think it is nice to have it.

BTW, you can kill the export of netpoll_send_skb_on_dev() too.

Thanks.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  3:26 ` [PATCH 0/2] netpoll: Trivial updates Cong Wang
@ 2011-07-01  3:35   ` Joe Perches
  2011-07-01  3:49     ` Cong Wang
  0 siblings, 1 reply; 18+ messages in thread
From: Joe Perches @ 2011-07-01  3:35 UTC (permalink / raw)
  To: Cong Wang; +Cc: linux-kernel, netdev

On Fri, 2011-07-01 at 11:26 +0800, Cong Wang wrote:
> 于 2011年07月01日 09:08, Joe Perches 写道:
> > cc: WANG Cong<amwang@redhat.com>
> > Joe Perches (2):
> >    netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
> >    netpoll: Remove trivial wrapper function netpoll_poll
> >   include/linux/netpoll.h |    2 --
> >   net/core/netpoll.c      |   13 +++----------
> >   2 files changed, 3 insertions(+), 12 deletions(-)
> I am fine with patch 1/2, but not 2/2, since it is trivial,
> why touch it? With netpoll_poll(), we don't need to explore the
> details of struct netpoll, I think it is nice to have it.

Shrug.  Neither is used.  Keep things minimal.

> BTW, you can kill the export of netpoll_send_skb_on_dev() too.

Not too sure about that.

It's used in netpoll.h by netpoll_send_skb.
It could be called from anywhere.
It's currently called/used by bonding.h.

cheers, Joe




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  3:35   ` Joe Perches
@ 2011-07-01  3:49     ` Cong Wang
  2011-07-01  3:55       ` Joe Perches
  2011-07-01  7:06       ` David Miller
  0 siblings, 2 replies; 18+ messages in thread
From: Cong Wang @ 2011-07-01  3:49 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, netdev

于 2011年07月01日 11:35, Joe Perches 写道:
>
>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
>
> Not too sure about that.
>
> It's used in netpoll.h by netpoll_send_skb.
> It could be called from anywhere.
> It's currently called/used by bonding.h.

% git grep netpoll_send_skb_on_dev .
include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
include/linux/netpoll.h:        netpoll_send_skb_on_dev(np, skb, np->dev);
net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);

No modules use it...

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  3:49     ` Cong Wang
@ 2011-07-01  3:55       ` Joe Perches
  2011-07-01  4:00         ` Cong Wang
  2011-07-01  7:06       ` David Miller
  1 sibling, 1 reply; 18+ messages in thread
From: Joe Perches @ 2011-07-01  3:55 UTC (permalink / raw)
  To: Cong Wang; +Cc: linux-kernel, netdev

On Fri, 2011-07-01 at 11:49 +0800, Cong Wang wrote:
> 于 2011年07月01日 11:35, Joe Perches 写道:
> >> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
> > Not too sure about that.
> > It's used in netpoll.h by netpoll_send_skb.
> > It could be called from anywhere.
> > It's currently called/used by bonding.h.
> % git grep netpoll_send_skb_on_dev .
> include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
> include/linux/netpoll.h:        netpoll_send_skb_on_dev(np, skb, np->dev);
> net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
> net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
> No modules use it...

Read what I wrote.

Look up one level at where it's used by netpoll.h.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  3:55       ` Joe Perches
@ 2011-07-01  4:00         ` Cong Wang
  2011-07-01  4:03           ` Joe Perches
  0 siblings, 1 reply; 18+ messages in thread
From: Cong Wang @ 2011-07-01  4:00 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, netdev

于 2011年07月01日 11:55, Joe Perches 写道:
> On Fri, 2011-07-01 at 11:49 +0800, Cong Wang wrote:
>> 于 2011年07月01日 11:35, Joe Perches 写道:
>>>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
>>> Not too sure about that.
>>> It's used in netpoll.h by netpoll_send_skb.
>>> It could be called from anywhere.
>>> It's currently called/used by bonding.h.
>> % git grep netpoll_send_skb_on_dev .
>> include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
>> include/linux/netpoll.h:        netpoll_send_skb_on_dev(np, skb, np->dev);
>> net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
>> net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
>> No modules use it...
>
> Read what I wrote.
>
> Look up one level at where it's used by netpoll.h.
>

Then move netpoll_send_skb(), export it instead of netpoll_send_skb_on_dev()...

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  4:00         ` Cong Wang
@ 2011-07-01  4:03           ` Joe Perches
  2011-07-01  4:05             ` Cong Wang
  0 siblings, 1 reply; 18+ messages in thread
From: Joe Perches @ 2011-07-01  4:03 UTC (permalink / raw)
  To: Cong Wang; +Cc: linux-kernel, netdev

On Fri, 2011-07-01 at 12:00 +0800, Cong Wang wrote:
> 于 2011年07月01日 11:55, Joe Perches 写道:
> > On Fri, 2011-07-01 at 11:49 +0800, Cong Wang wrote:
> >> 于 2011年07月01日 11:35, Joe Perches 写道:
> >>>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
> >>> Not too sure about that.
> >>> It's used in netpoll.h by netpoll_send_skb.
> >>> It could be called from anywhere.
> >>> It's currently called/used by bonding.h.
> > Read what I wrote.
> > Look up one level at where it's used by netpoll.h.
> Then move netpoll_send_skb(), export it instead of netpoll_send_skb_on_dev()...

Submit that if you choose.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  4:03           ` Joe Perches
@ 2011-07-01  4:05             ` Cong Wang
  0 siblings, 0 replies; 18+ messages in thread
From: Cong Wang @ 2011-07-01  4:05 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, netdev

于 2011年07月01日 12:03, Joe Perches 写道:
> On Fri, 2011-07-01 at 12:00 +0800, Cong Wang wrote:
>> 于 2011年07月01日 11:55, Joe Perches 写道:
>>> On Fri, 2011-07-01 at 11:49 +0800, Cong Wang wrote:
>>>> 于 2011年07月01日 11:35, Joe Perches 写道:
>>>>>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
>>>>> Not too sure about that.
>>>>> It's used in netpoll.h by netpoll_send_skb.
>>>>> It could be called from anywhere.
>>>>> It's currently called/used by bonding.h.
>>> Read what I wrote.
>>> Look up one level at where it's used by netpoll.h.
>> Then move netpoll_send_skb(), export it instead of netpoll_send_skb_on_dev()...
>
> Submit that if you choose.

Well, you are on it, I am fine to leave as it is, as you agree these
changes are all trivial. :)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  3:49     ` Cong Wang
  2011-07-01  3:55       ` Joe Perches
@ 2011-07-01  7:06       ` David Miller
  2011-07-01 22:18         ` Joe Perches
  1 sibling, 1 reply; 18+ messages in thread
From: David Miller @ 2011-07-01  7:06 UTC (permalink / raw)
  To: amwang; +Cc: joe, linux-kernel, netdev

From: Cong Wang <amwang@redhat.com>
Date: Fri, 01 Jul 2011 11:49:23 +0800

> 于 2011年07月01日 11:35, Joe Perches 写道:
>>
>>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
>>
>> Not too sure about that.
>>
>> It's used in netpoll.h by netpoll_send_skb.
>> It could be called from anywhere.
>> It's currently called/used by bonding.h.
> 
> % git grep netpoll_send_skb_on_dev .
> include/linux/netpoll.h:void netpoll_send_skb_on_dev(struct netpoll
> *np, struct sk_buff *skb,
> include/linux/netpoll.h: netpoll_send_skb_on_dev(np, skb, np->dev);
> net/core/netpoll.c:void netpoll_send_skb_on_dev(struct netpoll *np,
> struct sk_buff *skb,
> net/core/netpoll.c:EXPORT_SYMBOL(netpoll_send_skb_on_dev);
> 
> No modules use it...

Right, this is a relic that bonding was using at one point
in the past but it no longer does.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01  7:06       ` David Miller
@ 2011-07-01 22:18         ` Joe Perches
  2011-07-01 22:31           ` David Miller
  0 siblings, 1 reply; 18+ messages in thread
From: Joe Perches @ 2011-07-01 22:18 UTC (permalink / raw)
  To: David Miller; +Cc: amwang, linux-kernel, netdev

On Fri, 2011-07-01 at 00:06 -0700, David Miller wrote:
> From: Cong Wang <amwang@redhat.com>
> >>> BTW, you can kill the export of netpoll_send_skb_on_dev() too.
> >> Not too sure about that.
> >> It's used in netpoll.h by netpoll_send_skb.
> >> It could be called from anywhere.
> >> It's currently called/used by bonding.h.
> > % git grep netpoll_send_skb_on_dev .
[]
> > No modules use it...
> Right, this is a relic that bonding was using at one point
> in the past but it no longer does.

Are you sure?

netpoll.h:

void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
			     struct net_device *dev);
static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
{
	netpoll_send_skb_on_dev(np, skb, np->dev);
}

$ grep -rP --include=*.[ch] -w netpoll_send_skb *
drivers/net/bonding/bonding.h:		netpoll_send_skb(np, skb);
include/linux/netpoll.h:static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
net/bridge/br_private.h:		netpoll_send_skb(np, skb);
net/core/netpoll.c:			"netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n",
net/core/netpoll.c:	netpoll_send_skb(np, skb);
net/core/netpoll.c:		netpoll_send_skb(np, send_skb);

from bonding.h

#ifdef CONFIG_NET_POLL_CONTROLLER
static inline void bond_netpoll_send_skb(const struct slave *slave,
					 struct sk_buff *skb)
{
	struct netpoll *np = slave->np;

	if (np)
		netpoll_send_skb(np, skb);
}

and br_private.h

static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
				       struct sk_buff *skb)
{
	struct netpoll *np = p->np;

	if (np)
		netpoll_send_skb(np, skb);
}

These are inlined and dependent on CONFIG_NET_POLL_CONTROLLER
in drivers/net/Kconfig so doesn't netpoll_send_skb_on_dev need
to be SYMBOL_EXPORTed?

cheers, Joe


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/2] netpoll: Trivial updates
  2011-07-01 22:18         ` Joe Perches
@ 2011-07-01 22:31           ` David Miller
  0 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2011-07-01 22:31 UTC (permalink / raw)
  To: joe; +Cc: amwang, linux-kernel, netdev

From: Joe Perches <joe@perches.com>
Date: Fri, 01 Jul 2011 15:18:23 -0700

> These are inlined and dependent on CONFIG_NET_POLL_CONTROLLER
> in drivers/net/Kconfig so doesn't netpoll_send_skb_on_dev need
> to be SYMBOL_EXPORTed?

Right I noticed this when I read the rest of the thread
where this was discussed.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
  2011-07-01  1:08 ` [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev Joe Perches
@ 2011-07-04  3:02   ` David Miller
  2011-07-04  6:53   ` Harry Wei
  1 sibling, 0 replies; 18+ messages in thread
From: David Miller @ 2011-07-04  3:02 UTC (permalink / raw)
  To: joe; +Cc: linux-kernel, amwang, netdev

From: Joe Perches <joe@perches.com>
Date: Thu, 30 Jun 2011 18:08:57 -0700

> Unused symbols waste space.
> 
> Commit 0e34e93177fb
> "(netpoll: add generic support for bridge and bonding devices)"
> added the symbol more than a year ago with the promise of "future use".
> 
> Because it is so far unused, remove it for now.
> It can be easily readded if or when it actually needs to be used.
> 
> cc: WANG Cong <amwang@redhat.com>
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll
  2011-07-01  1:08 ` [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll Joe Perches
@ 2011-07-04  3:02   ` David Miller
  0 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2011-07-04  3:02 UTC (permalink / raw)
  To: joe; +Cc: linux-kernel, amwang, netdev

From: Joe Perches <joe@perches.com>
Date: Thu, 30 Jun 2011 18:08:58 -0700

> Too trivial to live.
> 
> cc: WANG Cong <amwang@redhat.com>
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
  2011-07-01  1:08 ` [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev Joe Perches
  2011-07-04  3:02   ` David Miller
@ 2011-07-04  6:53   ` Harry Wei
  2011-07-04  7:46     ` Joe Perches
  1 sibling, 1 reply; 18+ messages in thread
From: Harry Wei @ 2011-07-04  6:53 UTC (permalink / raw)
  To: Joe Perches; +Cc: amwang, linux-kernel, davem, netdev

On Thu, Jun 30, 2011 at 06:08:57PM -0700, Joe Perches wrote:
> Unused symbols waste space.
> 
> Commit 0e34e93177fb
> "(netpoll: add generic support for bridge and bonding devices)"
> added the symbol more than a year ago with the promise of "future use".
> 
> Because it is so far unused, remove it for now.
> It can be easily readded if or when it actually needs to be used.
> 
> cc: WANG Cong <amwang@redhat.com>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  include/linux/netpoll.h |    2 --
>  net/core/netpoll.c      |    6 ++----
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
> index 79358bb..5dfa091 100644
> --- a/include/linux/netpoll.h
> +++ b/include/linux/netpoll.h
> @@ -40,8 +40,6 @@ struct netpoll_info {
>  	struct netpoll *netpoll;
>  };
>  
> -void netpoll_poll_dev(struct net_device *dev);
> -void netpoll_poll(struct netpoll *np);
>  void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
>  void netpoll_print_options(struct netpoll *np);
>  int netpoll_parse_options(struct netpoll *np, char *opt);
> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index 18d9cbd..4ce595e 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -177,7 +177,7 @@ static void service_arp_queue(struct netpoll_info *npi)
>  	}
>  }
>  
> -void netpoll_poll_dev(struct net_device *dev)
> +static void netpoll_poll_dev(struct net_device *dev)
Hi Joe,
You have removed the function declaration in include/linux/netpoll.h.
And you changed the function like 
static void netpoll_poll_dev(...)
{
	...
}
But i don't know its usage.
The 'static' before this function just says the active area of 'netpoll_poll_dev'
is in the file net/core/netpoll.c. What is the purpose? Could you please tell me?

Thanks in advance.

>  {
>  	const struct net_device_ops *ops;
>  
> @@ -208,13 +208,11 @@ void netpoll_poll_dev(struct net_device *dev)
>  
>  	zap_completion_queue();
>  }
> -EXPORT_SYMBOL(netpoll_poll_dev);
>  
> -void netpoll_poll(struct netpoll *np)
> +static void netpoll_poll(struct netpoll *np)
>  {
>  	netpoll_poll_dev(np->dev);
>  }
> -EXPORT_SYMBOL(netpoll_poll);
>  
>  static void refill_skbs(void)
>  {
> -- 
> 1.7.6.rc1

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
  2011-07-04  6:53   ` Harry Wei
@ 2011-07-04  7:46     ` Joe Perches
  2011-07-04  9:27       ` Harry Wei
  0 siblings, 1 reply; 18+ messages in thread
From: Joe Perches @ 2011-07-04  7:46 UTC (permalink / raw)
  To: Harry Wei; +Cc: amwang, linux-kernel, davem, netdev

On Mon, 2011-07-04 at 14:53 +0800, Harry Wei wrote:
> On Thu, Jun 30, 2011 at 06:08:57PM -0700, Joe Perches wrote:
> > Unused symbols waste space.
> > Commit 0e34e93177fb
> > "(netpoll: add generic support for bridge and bonding devices)"
> > added the symbol more than a year ago with the promise of "future use".
> > Because it is so far unused, remove it for now.
> > It can be easily readded if or when it actually needs to be used.
> > cc: WANG Cong <amwang@redhat.com>
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> >  include/linux/netpoll.h |    2 --
> >  net/core/netpoll.c      |    6 ++----
> >  2 files changed, 2 insertions(+), 6 deletions(-)
> > diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
[]
> > @@ -40,8 +40,6 @@ struct netpoll_info {
> >  	struct netpoll *netpoll;
> >  };
> >  
> > -void netpoll_poll_dev(struct net_device *dev);
> > -void netpoll_poll(struct netpoll *np);
> >  void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
> >  void netpoll_print_options(struct netpoll *np);
> >  int netpoll_parse_options(struct netpoll *np, char *opt);
> > diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> > index 18d9cbd..4ce595e 100644
> > --- a/net/core/netpoll.c
> > +++ b/net/core/netpoll.c
> > @@ -177,7 +177,7 @@ static void service_arp_queue(struct netpoll_info *npi)
> >  	}
> >  }
> >  
> > -void netpoll_poll_dev(struct net_device *dev)
> > +static void netpoll_poll_dev(struct net_device *dev)
> You have removed the function declaration in include/linux/netpoll.h.

Because it's unused by anything in the tree
but netpoll.c

> And you changed the function like 
> static void netpoll_poll_dev(...)
> {
> 	...
> }
> But i don't know its usage.

It's now a local function to netpoll.c

> The 'static' before this function just says the active area of 'netpoll_poll_dev'
> is in the file net/core/netpoll.c. What is the purpose? Could you please tell me?

It prods the device to perform network work.

	/* Process pending work on NIC */
	ops->ndo_poll_controller(dev);

	poll_napi(dev);




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
  2011-07-04  7:46     ` Joe Perches
@ 2011-07-04  9:27       ` Harry Wei
  0 siblings, 0 replies; 18+ messages in thread
From: Harry Wei @ 2011-07-04  9:27 UTC (permalink / raw)
  To: Joe Perches; +Cc: amwang, linux-kernel, davem, netdev

On Mon, Jul 04, 2011 at 12:46:29AM -0700, Joe Perches wrote:
[...]
> > You have removed the function declaration in include/linux/netpoll.h.
> 
> Because it's unused by anything in the tree
> but netpoll.c
Hmmmm..., so sorry. I misunderstood your 'unused', which i thought
there was also no use in netpoll.c :-/
> 
> > And you changed the function like 
> > static void netpoll_poll_dev(...)
> > {
> > 	...
> > }
> > But i don't know its usage.
> 
> It's now a local function to netpoll.c
Yeah, it's true.
> 
> > The 'static' before this function just says the active area of 'netpoll_poll_dev'
> > is in the file net/core/netpoll.c. What is the purpose? Could you please tell me?
> 
> It prods the device to perform network work.
> 
> 	/* Process pending work on NIC */
> 	ops->ndo_poll_controller(dev);
> 
> 	poll_napi(dev);
Yeah, i will read the codes.


Thanks so much
Harry Wei

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-07-04  9:27 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01  1:08 [PATCH 0/2] netpoll: Trivial updates Joe Perches
2011-07-01  1:08 ` [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev Joe Perches
2011-07-04  3:02   ` David Miller
2011-07-04  6:53   ` Harry Wei
2011-07-04  7:46     ` Joe Perches
2011-07-04  9:27       ` Harry Wei
2011-07-01  1:08 ` [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll Joe Perches
2011-07-04  3:02   ` David Miller
2011-07-01  3:26 ` [PATCH 0/2] netpoll: Trivial updates Cong Wang
2011-07-01  3:35   ` Joe Perches
2011-07-01  3:49     ` Cong Wang
2011-07-01  3:55       ` Joe Perches
2011-07-01  4:00         ` Cong Wang
2011-07-01  4:03           ` Joe Perches
2011-07-01  4:05             ` Cong Wang
2011-07-01  7:06       ` David Miller
2011-07-01 22:18         ` Joe Perches
2011-07-01 22:31           ` David Miller

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.