From 25f9eea68b73da4b1be60d68048acb07875fc205 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sat, 30 Jun 2007 19:24:30 +0000 Subject: [PATCH] Use more TAILQ macro. From OpenBSD. --- sys/dev/ic/osiop.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index 151c5bebc54f..9442455d5f56 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $NetBSD: osiop.c,v 1.30 2007/06/30 14:56:48 tsutsui Exp $ */ +/* $NetBSD: osiop.c,v 1.31 2007/06/30 19:24:30 tsutsui Exp $ */ /* * Copyright (c) 2001 Izumi Tsutsui. All rights reserved. @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osiop.c,v 1.30 2007/06/30 14:56:48 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osiop.c,v 1.31 2007/06/30 19:24:30 tsutsui Exp $"); /* #define OSIOP_DEBUG */ @@ -544,8 +544,8 @@ osiop_sched(struct osiop_softc *sc) printf("%s: osiop_sched- nexus %p/%d ready %p/%d\n", sc->sc_dev.dv_xname, sc->sc_nexus, sc->sc_nexus->xs->xs_periph->periph_target, - sc->ready_list.tqh_first, - sc->ready_list.tqh_first->xs->xs_periph->periph_target); + TAILQ_FIRST(&sc->ready_list), + TAILQ_FIRST(&sc->ready_list)->xs->xs_periph->periph_target); return; } #endif @@ -660,7 +660,7 @@ osiop_scsidone(struct osiop_acb *acb, int status) dosched = 1; /* start next command */ sc->sc_active--; OSIOP_TRACE('d', 'a', status, 0); - } else if (sc->ready_list.tqh_last == &acb->chain.tqe_next) { + } else if (sc->ready_list.tqh_last == &TAILQ_NEXT(acb, chain)) { TAILQ_REMOVE(&sc->ready_list, acb, chain); OSIOP_TRACE('d', 'r', status, 0); } else { @@ -675,7 +675,7 @@ osiop_scsidone(struct osiop_acb *acb, int status) } } if (acb2 == NULL) { - if (acb->chain.tqe_next != NULL) { + if (TAILQ_NEXT(acb, chain) != NULL) { TAILQ_REMOVE(&sc->ready_list, acb, chain); sc->sc_active--; } else {