Subject: kern/18988: ehci.c compile error
To: None <gnats-bugs@gnats.netbsd.org>
From: None <naoki@fukaumi.org>
List: netbsd-bugs
Date: 11/09/2002 16:31:11
>Number:         18988
>Category:       kern
>Synopsis:       ehci.c compile error
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 08 23:32:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 1.6J
>Organization:
	FUKAUMI Naoki
>Environment:
System: NetBSD nforce.naobsd.org 1.6J NetBSD 1.6J (NFORCE) #0: Wed Nov 6 11:49:59 JST 2002 fun@nforce.naobsd.org:/usr/obj/i386/sys/arch/i386/compile/NFORCE i386
Architecture: i386
Machine: i386
>Description:
	ehci.c can't compile if (EHCI_DEBUG && !DIAGNOSTIC) case.
	ehci_dump is not used. ehci_dump_exfer is used only DIAGNOSTIC.
>How-To-Repeat:
	enable options EHCI_DEBUG and disable options DIAGNOSTIC.
>Fix:
	patch

Index: ehci.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/usb/ehci.c,v
retrieving revision 1.37
diff -u -r1.37 ehci.c
--- ehci.c	2002/09/27 15:37:34	1.37
+++ ehci.c	2002/10/28 01:42:20
@@ -200,15 +200,16 @@
 
 #ifdef EHCI_DEBUG
 Static void		ehci_dump_regs(ehci_softc_t *);
-Static void		ehci_dump(void);
 Static ehci_softc_t 	*theehci;
 Static void		ehci_dump_link(ehci_link_t, int);
 Static void		ehci_dump_sqtds(ehci_soft_qtd_t *);
 Static void		ehci_dump_sqtd(ehci_soft_qtd_t *);
 Static void		ehci_dump_qtd(ehci_qtd_t *);
 Static void		ehci_dump_sqh(ehci_soft_qh_t *);
+#ifdef DIAGNOSTIC
 Static void		ehci_dump_exfer(struct ehci_xfer *);
 #endif
+#endif
 
 #define MS_TO_TICKS(ms) ((ms) * hz / 1000)
 
@@ -1054,12 +1055,6 @@
 }
 
 void
-ehci_dump()
-{
-	ehci_dump_regs(theehci);
-}
-
-void
 ehci_dump_link(ehci_link_t link, int type)
 {
 	link = le32toh(link);
@@ -1152,11 +1147,13 @@
 	ehci_dump_qtd(&qh->qh_qtd);
 }
 
+#ifdef DIAGNOSTIC
 Static void
 ehci_dump_exfer(struct ehci_xfer *ex)
 {
 	printf("ehci_dump_exfer: ex=%p\n", ex);
 }
+#endif
 #endif
 
 usbd_status
>Release-Note:
>Audit-Trail:
>Unformatted: