Subject: Re: FYI: Unused function ehci_dump()
To: Bill Studenmund <wrstuden@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: tech-kern
Date: 11/03/2005 17:23:18
--uAKRQypu60I7Lcqm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Oct 28, 2005 at 07:59:52PM -0700, Bill Studenmund wrote:
> On Sat, Oct 29, 2005 at 10:00:49AM +0930, Berndt Josef Wulf wrote:
> > G'day,
> > 
> > Building kernels with EHCI_DEBUG enabled will fail due to unused function 
> > ehci_dump(). I had to remove this function in order to succeed with the 
> > built.
> > 
> > Are there any plans to use this function in future? If not, we may want to 
> > remove it.
> 
> As I understand it, it's something that you would run from ddb when you're
> having troubles with ehci.
> 
> I believe it was going to be fixed so that gcc won't whine.

The following seems to do the trick - I just still haven't tested the
kernel yet - should be safe to apply nevertheless (I can't)

Cheers,

Patrick

--uAKRQypu60I7Lcqm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=ehcipat

Index: ehci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ehci.c,v
retrieving revision 1.105
diff -u -r1.105 ehci.c
--- ehci.c	18 Jul 2005 11:08:00 -0000	1.105
+++ ehci.c	3 Nov 2005 17:22:19 -0000
@@ -219,7 +219,7 @@
 
 #ifdef EHCI_DEBUG
 Static void		ehci_dump_regs(ehci_softc_t *);
-Static void		ehci_dump(void);
+Static void		ehci_dump(void) __attribute__((__unused__));
 Static ehci_softc_t 	*theehci;
 Static void		ehci_dump_link(ehci_link_t, int);
 Static void		ehci_dump_sqtds(ehci_soft_qtd_t *);

--uAKRQypu60I7Lcqm--