summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-04-20 14:01:09 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-04-20 14:01:09 +0000
commit9a2346bcefd03a5863437426538523cf5d1a69e7 (patch)
tree0300e543c5d1aef877993e5eefa95be53284884a
parent18d373ca778d9fbb57b4db5923ca05bb5285fea4 (diff)
marco hates typedefs as much as i do, so he asked me to clean mfi like i
just did with ami. this gets rid of the typedef for the ccb lists. also uses TAILQ_FIRST to get ccbs off the freelist. this is a proactive fix for a lint teary.
-rw-r--r--sys/dev/ic/mfi.c4
-rw-r--r--sys/dev/ic/mfivar.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 5cfa276c831..072a0be0d4b 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.19 2006/04/18 16:29:54 marco Exp $ */
+/* $OpenBSD: mfi.c,v 1.20 2006/04/20 14:01:08 dlg Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -86,7 +86,7 @@ mfi_get_ccb(struct mfi_softc *sc)
int s;
s = splbio();
- ccb = TAILQ_LAST(&sc->sc_ccb_freeq, mfi_queue_head);
+ ccb = TAILQ_FIRST(&sc->sc_ccb_freeq);
if (ccb) {
TAILQ_REMOVE(&sc->sc_ccb_freeq, ccb, ccb_link);
ccb->ccb_state = MFI_CCB_READY;
diff --git a/sys/dev/ic/mfivar.h b/sys/dev/ic/mfivar.h
index 9f042df9f8c..87a19cdc053 100644
--- a/sys/dev/ic/mfivar.h
+++ b/sys/dev/ic/mfivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfivar.h,v 1.11 2006/04/17 16:46:39 marco Exp $ */
+/* $OpenBSD: mfivar.h,v 1.12 2006/04/20 14:01:08 dlg Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -79,7 +79,7 @@ struct mfi_ccb {
TAILQ_ENTRY(mfi_ccb) ccb_link;
};
-typedef TAILQ_HEAD(mfi_queue_head, mfi_ccb) mfi_queue_head;
+TAILQ_HEAD(mfi_ccb_list, mfi_ccb);
struct mfi_softc {
struct device sc_dev;
@@ -109,7 +109,7 @@ struct mfi_softc {
/* sense memory */
struct mfi_mem *sc_sense;
- mfi_queue_head sc_ccb_freeq;
+ struct mfi_ccb_list sc_ccb_freeq;
};
int mfi_attach(struct mfi_softc *sc);