netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Jeff Garzik <jeff@garzik.org>,
	netdev@vger.kernel.org
Subject: Re: 2.6.19-rc6-mm1: drivers/net/chelsio/: unused code
Date: Tue, 20 Feb 2007 23:06:47 +0100	[thread overview]
Message-ID: <20070220220647.GZ13958@stusta.de> (raw)
In-Reply-To: <20070220133132.63f3e75e@localhost.localdomain>

On Tue, Feb 20, 2007 at 01:31:32PM -0800, Stephen Hemminger wrote:
> On Tue, 20 Feb 2007 01:02:14 +0100
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > On Tue, Nov 28, 2006 at 11:47:19PM -0800, Andrew Morton wrote:
> > > On Wed, 29 Nov 2006 08:36:09 +0100
> > > Adrian Bunk <bunk@stusta.de> wrote:
> > > 
> > > > On Mon, Nov 27, 2006 at 10:24:55AM -0800, Stephen Hemminger wrote:
> > > > > On Fri, 24 Nov 2006 01:17:31 +0100
> > > > > Adrian Bunk <bunk@stusta.de> wrote:
> > > > > 
> > > > > > On Thu, Nov 23, 2006 at 02:17:03AM -0800, Andrew Morton wrote:
> > > > > > >...
> > > > > > > Changes since 2.6.19-rc5-mm2:
> > > > > > >...
> > > > > > > +chelsio-22-driver.patch
> > > > > > >...
> > > > > > >  netdev updates
> > > > > > 
> > > > > > It is suspicious that the following newly added code is completely unused:
> > > > > >   drivers/net/chelsio/ixf1010.o
> > > > > >     t1_ixf1010_ops
> > > > > >   drivers/net/chelsio/mac.o
> > > > > >     t1_chelsio_mac_ops
> > > > > >   drivers/net/chelsio/vsc8244.o
> > > > > >     t1_vsc8244_ops
> > > > > > 
> > > > > > cu
> > > > > > Adrian
> > > > > > 
> > > > > 
> > > > > All that is gone in later version. I reposted new patches
> > > > > after -mm2 was done.
> > > > 
> > > > It seems these patches didn't make it into 2.6.19-rc6-mm2 ?
> > > 
> > > I dropped that patch and picked up Francois's tree instead.
> > 
> > These structs are still both present and unused as of 2.6.20-mm1.
> 
> Please use your eyes, not your tool. Those functions are called in 2.6.20


My eyes tell me:


> static struct cmac *ixf1010_mac_create(adapter_t *adapter, int index)
> {
> ...
> 	mac->ops = &ixf1010_ops;


ixf1010_ops != t1_ixf1010_ops


> static struct cmac *mac_create(adapter_t *adapter, int index)
> {
> ...
> 
> 	mac->ops = &chelsio_mac_ops;


chelsio_mac_ops != t1_chelsio_mac_ops


> mac_create gets called by 
> 
> int __devinit t1_init_sw_modules(adapter_t *adapter,
> 				 const struct board_info *bi)
> {
> 
> 	for_each_port(adapter, i) {
> 		u8 hw_addr[6];
> 		struct cmac *mac;
> 		int phy_addr = bi->mdio_phybaseaddr + i;
> 
> 		adapter->port[i].phy = bi->gphy->create(adapter, phy_addr,
> 							bi->mdio_ops);


No, since t1_chelsio_mac_ops isn't used anywhere and mac_create() isn't 
referenced except from t1_chelsio_mac_ops.


cu
Adrian

BTW: It's not my tool, the script behind "make namespacecheck" was
     written by Keith Owens.

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2007-02-20 22:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061123021703.8550e37e.akpm@osdl.org>
2006-11-23 23:30 ` 2.6.19-rc6-mm1: no help text for TCP_MD5SIG_DEBUG Adrian Bunk
2006-11-24  1:37   ` David Miller
2006-11-24  0:17 ` 2.6.19-rc6-mm1: drivers/net/chelsio/: unused code Adrian Bunk
2006-11-27 18:24   ` Stephen Hemminger
2006-11-29  7:36     ` Adrian Bunk
2006-11-29  7:47       ` Andrew Morton
2007-02-20  0:02         ` Adrian Bunk
2007-02-20 21:31           ` Stephen Hemminger
2007-02-20 22:06             ` Adrian Bunk [this message]
2006-11-24 21:58 ` [-mm patch] net/: possible cleanups Adrian Bunk
2006-12-01  1:28   ` 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=20070220220647.GZ13958@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).