Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Harry Wei <jiaweiwei.xiyou@gmail.com>
Cc: amwang@redhat.com, linux-kernel@vger.kernel.org,
	davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
Date: Mon, 04 Jul 2011 00:46:29 -0700	[thread overview]
Message-ID: <1309765589.18925.42.camel@Joe-Laptop> (raw)
In-Reply-To: <20110704065320.GA2588@gmail.com>

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);

  reply	other threads:[~2011-07-04  7:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=1309765589.18925.42.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jiaweiwei.xiyou@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox