summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-02-27 09:16:00 +0000
committerjulian <julian@FreeBSD.org>2002-02-27 09:16:00 +0000
commitfddda3307dd74c84941a41b9226b67ad3a2f1a99 (patch)
tree55c4a16c2cbab0c4e6582de3df6f87ca6ae41b8e /sys/dev
parent3df0f7614526bf04b83f28add384b66ef295b55b (diff)
downloadFreeBSD-src-fddda3307dd74c84941a41b9226b67ad3a2f1a99.zip
FreeBSD-src-fddda3307dd74c84941a41b9226b67ad3a2f1a99.tar.gz
Fix warnings that have become fatal
1/ conditionalise (#if 0) function that is not used. Unused code left in place for netBSD compatibility. 2/ Recode loop to convince gcc that it does initialise a variable (use do-while instead of for() so gcc knows that we always go through at least once. Feel free to check my logic.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/ohci.c9
-rw-r--r--sys/dev/usb/uhci.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 9ad8ee9..369f246 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1050,9 +1050,12 @@ ohci_intr1(ohci_softc_t *sc)
ohci_physaddr_t ldone;
ohci_soft_td_t *std;
- for (ldone = sc->sc_done; ldone != 0;
- ldone = le32toh(std->td.td_nexttd))
- std = ohci_hash_find_td(sc, ldone);
+ ldone = sc->sc_done; /* always non 0 */
+ do {
+ std = ohci_hash_find_td(sc, ldone);
+ ldone = le32toh(std->td.td_nexttd);
+ } while (ldone != 0);
+
std->td.td_nexttd = le32toh(done);
}
sc->sc_hcca->hcca_done_head = 0;
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 5d20a23..de4e64f 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -161,7 +161,9 @@ struct uhci_pipe {
Static LIST_HEAD(, uhci_intr_info) uhci_ii_free;
Static void uhci_busreset(uhci_softc_t *);
+#if 0
Static void uhci_reset(uhci_softc_t *);
+#endif
Static usbd_status uhci_run(uhci_softc_t *, int run);
Static uhci_soft_td_t *uhci_alloc_std(uhci_softc_t *);
Static void uhci_free_std(uhci_softc_t *, uhci_soft_td_t *);
@@ -1475,6 +1477,7 @@ uhci_poll(struct usbd_bus *bus)
uhci_intr(sc);
}
+#if 0
void
uhci_reset(uhci_softc_t *sc)
{
@@ -1489,6 +1492,7 @@ uhci_reset(uhci_softc_t *sc)
printf("%s: controller did not reset\n",
USBDEVNAME(sc->sc_bus.bdev));
}
+#endif
usbd_status
uhci_run(uhci_softc_t *sc, int run)
OpenPOWER on IntegriCloud