Message ID | 282ce7d68b97c4dbfb759c1c0752e6cbddfeeafc.1309482314.git.joe@perches.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
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. -- 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
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 -- 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
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); -- 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
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 -- 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 --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) {
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(-)