linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] usbnet.c: remove an unused function
@ 2004-10-28 23:24 Adrian Bunk
  2004-10-29  0:28 ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2004-10-28 23:24 UTC (permalink / raw)
  To: dbrownell; +Cc: greg, linux-usb-devel, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The patch below removes an unused function from drivers/usb/net/usbnet.c


diffstat output:
 drivers/usb/net/usbnet.c |    6 ------
 1 files changed, 6 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

- --- linux-2.6.10-rc1-mm1-full/drivers/usb/net/usbnet.c.old	2004-10-28 23:32:50.000000000 +0200
+++ linux-2.6.10-rc1-mm1-full/drivers/usb/net/usbnet.c	2004-10-28 23:33:23.000000000 +0200
@@ -2127,12 +2127,6 @@
 }
 
 static inline int
- -pl_clear_QuickLink_features (struct usbnet *dev, int val)
- -{
- -	return pl_vendor_req (dev, 1, (u8) val, 0);
- -}
- -
- -static inline int
 pl_set_QuickLink_features (struct usbnet *dev, int val)
 {
 	return pl_vendor_req (dev, 3, (u8) val, 0);

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBgX/HmfzqmE8StAARAvVCAJ9wqcniAa5kgAtve4KqGdgI+zXx4ACeLPet
/dF6osevC+GlXF3HSbiFWVM=
=nlSX
-----END PGP SIGNATURE-----

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

* [2.6 patch] usbnet.c: remove an unused function
  2004-10-28 23:24 [2.6 patch] usbnet.c: remove an unused function Adrian Bunk
@ 2004-10-29  0:28 ` Adrian Bunk
  2004-10-29 23:17   ` David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2004-10-29  0:28 UTC (permalink / raw)
  To: dbrownell; +Cc: greg, linux-usb-devel, linux-kernel

[ this time without the problems due to a digital signature... ]

The patch below removes an unused function from drivers/usb/net/usbnet.c


diffstat output:
 drivers/usb/net/usbnet.c |    6 ------
 1 files changed, 6 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-rc1-mm1-full/drivers/usb/net/usbnet.c.old	2004-10-28 23:32:50.000000000 +0200
+++ linux-2.6.10-rc1-mm1-full/drivers/usb/net/usbnet.c	2004-10-28 23:33:23.000000000 +0200
@@ -2127,12 +2127,6 @@
 }
 
 static inline int
-pl_clear_QuickLink_features (struct usbnet *dev, int val)
-{
-	return pl_vendor_req (dev, 1, (u8) val, 0);
-}
-
-static inline int
 pl_set_QuickLink_features (struct usbnet *dev, int val)
 {
 	return pl_vendor_req (dev, 3, (u8) val, 0);

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

* Re: [2.6 patch] usbnet.c: remove an unused function
  2004-10-29  0:28 ` Adrian Bunk
@ 2004-10-29 23:17   ` David Brownell
  2004-10-29 23:27     ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: David Brownell @ 2004-10-29 23:17 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: dbrownell, greg, linux-usb-devel, linux-kernel

On Thursday 28 October 2004 17:28, Adrian Bunk wrote:
> [ this time without the problems due to a digital signature... ]
> 
> The patch below removes an unused function from drivers/usb/net/usbnet.c

Actually in this case I'd rather leave the function there;
the documentation on this chip is hard to find, and this
function will be needed when someone finally spends the time
to fix some of the init/reset handshake issues for these
PL2301/2302 chips.  The current init code cloned some
very ancient code from about the 2.2.10 (!) or so kernel.

Speaking of which ... anyone motivated to solve that can
probably find answers in a file transfer package I saw
a while back (but lost!) for file transferring files
to/from Linux, especialy for Playstation 2 boxes.  That
used a very different handshaking scheme... possibly one
that's incompatible with Linux 2.2, but evidently one
that worked reliably and noticed connect change events.
(Neither is true of the current PL2301/2302 code!)

- Dave

p.s. Last I looked, GCC ignored unused inlines; no code
     generated, no warnings.  Did that change?

> 
> diffstat output:
>  drivers/usb/net/usbnet.c |    6 ------
>  1 files changed, 6 deletions(-)
> 
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> 
> --- linux-2.6.10-rc1-mm1-full/drivers/usb/net/usbnet.c.old	2004-10-28 
23:32:50.000000000 +0200
> +++ linux-2.6.10-rc1-mm1-full/drivers/usb/net/usbnet.c	2004-10-28 
23:33:23.000000000 +0200
> @@ -2127,12 +2127,6 @@
>  }
>  
>  static inline int
> -pl_clear_QuickLink_features (struct usbnet *dev, int val)
> -{
> -	return pl_vendor_req (dev, 1, (u8) val, 0);
> -}
> -
> -static inline int
>  pl_set_QuickLink_features (struct usbnet *dev, int val)
>  {
>  	return pl_vendor_req (dev, 3, (u8) val, 0);
> 

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

* Re: [2.6 patch] usbnet.c: remove an unused function
  2004-10-29 23:17   ` David Brownell
@ 2004-10-29 23:27     ` Adrian Bunk
  2004-10-30  0:37       ` [linux-usb-devel] " David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2004-10-29 23:27 UTC (permalink / raw)
  To: David Brownell; +Cc: dbrownell, greg, linux-usb-devel, linux-kernel

On Fri, Oct 29, 2004 at 04:17:30PM -0700, David Brownell wrote:
> On Thursday 28 October 2004 17:28, Adrian Bunk wrote:
> > [ this time without the problems due to a digital signature... ]
> > 
> > The patch below removes an unused function from drivers/usb/net/usbnet.c
> 
> Actually in this case I'd rather leave the function there;
> the documentation on this chip is hard to find, and this
> function will be needed when someone finally spends the time
> to fix some of the init/reset handshake issues for these
> PL2301/2302 chips.  The current init code cloned some
> very ancient code from about the 2.2.10 (!) or so kernel.
>...

OK.

> - Dave
> 
> p.s. Last I looked, GCC ignored unused inlines; no code
>      generated, no warnings.  Did that change?
>...

It didn't change.

But there are three different possible reactions on my patches:
1. ACK, kill this dead code
2. ups, I really wanted to use this function
3. please keep, code using this function will/might follow in the future

Case 1 is the most common case (and this simply removes some dead code).

I had until now two times case 2 (which means the code is now better).

You are the first person for case 3.

cu
Adrian

-- 

       "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


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

* Re: [linux-usb-devel] Re: [2.6 patch] usbnet.c: remove an unused function
  2004-10-29 23:27     ` Adrian Bunk
@ 2004-10-30  0:37       ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2004-10-30  0:37 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: Adrian Bunk, linux-kernel

On Friday 29 October 2004 16:27, Adrian Bunk wrote:
> On Fri, Oct 29, 2004 at 04:17:30PM -0700, David Brownell wrote:

> > p.s. Last I looked, GCC ignored unused inlines; no code
> >      generated, no warnings.  Did that change?
> >...
> 
> It didn't change.
> 
> But there are three different possible reactions on my patches:
> 1. ACK, kill this dead code
> 2. ups, I really wanted to use this function
> 3. please keep, code using this function will/might follow in the future
> 
> Case 1 is the most common case (and this simply removes some dead code).
> 
> I had until now two times case 2 (which means the code is now better).
> 
> You are the first person for case 3.

And presumably there will also be at least a few case 4:

  4. no response, treated as an ACK.

:)


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

end of thread, other threads:[~2004-10-30  0:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-28 23:24 [2.6 patch] usbnet.c: remove an unused function Adrian Bunk
2004-10-29  0:28 ` Adrian Bunk
2004-10-29 23:17   ` David Brownell
2004-10-29 23:27     ` Adrian Bunk
2004-10-30  0:37       ` [linux-usb-devel] " David Brownell

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