diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-02-04 13:13:25 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-02-04 13:13:25 +0000 |
| commit | fc2ffbe6040d6630a06229c5c9be77601fb635eb (patch) | |
| tree | 328f91e23b34b382d998fba4c7e55796b240b62b /sys/dev | |
| parent | ef9e85abba5ce45c8b3fc840db320edb1abe0160 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/aic7xxx/aicasm/aicasm.c | 14 | ||||
| -rw-r--r-- | sys/dev/aic7xxx/aicasm/aicasm_symbol.c | 40 | ||||
| -rw-r--r-- | sys/dev/asr/asr.c | 2 | ||||
| -rw-r--r-- | sys/dev/de/if_de.c | 12 | ||||
| -rw-r--r-- | sys/dev/ed/if_ed.c | 4 | ||||
| -rw-r--r-- | sys/dev/eisa/eisaconf.c | 6 | ||||
| -rw-r--r-- | sys/dev/ex/if_ex.c | 2 | ||||
| -rw-r--r-- | sys/dev/fe/if_fe.c | 4 | ||||
| -rw-r--r-- | sys/dev/ie/if_ie.c | 4 | ||||
| -rw-r--r-- | sys/dev/pdq/pdq_ifsubr.c | 4 | ||||
| -rw-r--r-- | sys/dev/sf/if_sf.c | 2 | ||||
| -rw-r--r-- | sys/dev/sk/if_sk.c | 2 | ||||
| -rw-r--r-- | sys/dev/sn/if_sn.c | 4 | ||||
| -rw-r--r-- | sys/dev/ti/if_ti.c | 4 | ||||
| -rw-r--r-- | sys/dev/usb/uhci.c | 2 | ||||
| -rw-r--r-- | sys/dev/wl/if_wl.c | 6 | ||||
| -rw-r--r-- | sys/dev/xe/if_xe.c | 8 |
17 files changed, 60 insertions, 60 deletions
diff --git a/sys/dev/aic7xxx/aicasm/aicasm.c b/sys/dev/aic7xxx/aicasm/aicasm.c index 8ca1f65bddbd..1402b3a76d06 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm.c +++ b/sys/dev/aic7xxx/aicasm/aicasm.c @@ -178,9 +178,9 @@ main(int argc, char *argv[]) "times\n", appname); } includes_search_curdir = 0; - for (include_dir = search_path.slh_first; + for (include_dir = SLIST_FIRST(&search_path); include_dir != NULL; - include_dir = include_dir->links.sle_next) + include_dir = SLIST_NEXT(include_dir, links)) /* * All entries before a '-I-' only * apply to includes specified with @@ -276,9 +276,9 @@ back_patch() { struct instruction *cur_instr; - for(cur_instr = seq_program.stqh_first; + for(cur_instr = STAILQ_FIRST(&seq_program); cur_instr != NULL; - cur_instr = cur_instr->links.stqe_next) { + cur_instr = STAILQ_NEXT(cur_instr, links)) { if (cur_instr->patch_label != NULL) { struct ins_format3 *f3_instr; u_int address; @@ -316,12 +316,12 @@ output_code() */\n"); fprintf(ofile, "static uint8_t seqprog[] = {\n"); - for(cur_instr = seq_program.stqh_first; + for(cur_instr = STAILQ_FIRST(&seq_program); cur_instr != NULL; - cur_instr = cur_instr->links.stqe_next) { + cur_instr = STAILQ_NEXT(cur_instr, links)) { fprintf(ofile, "%s\t0x%02x, 0x%02x, 0x%02x, 0x%02x", - cur_instr == seq_program.stqh_first ? "" : ",\n", + cur_instr == STAILQ_FIRST(&seq_program) ? "" : ",\n", #if BYTE_ORDER == LITTLE_ENDIAN cur_instr->format.bytes[0], cur_instr->format.bytes[1], diff --git a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c index 1e51d6244a0c..974c8c4825c8 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c +++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c @@ -191,11 +191,11 @@ symlist_search(symlist_t *symlist, char *symname) { symbol_node_t *curnode; - curnode = symlist->slh_first; + curnode = SLIST_FIRST(symlist); while(curnode != NULL) { if (strcmp(symname, curnode->symbol->name) == 0) break; - curnode = curnode->links.sle_next; + curnode = SLIST_NEXT(curnode, links); } return (curnode); } @@ -231,7 +231,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how) /* NOTREACHED */ } - curnode = symlist->slh_first; + curnode = SLIST_FIRST(symlist); if (curnode == NULL || (mask && (curnode->symbol->info.minfo->mask > newnode->symbol->info.minfo->mask)) @@ -242,14 +242,14 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how) } while (1) { - if (curnode->links.sle_next == NULL) { + if (SLIST_NEXT(curnode, links) == NULL) { SLIST_INSERT_AFTER(curnode, newnode, links); break; } else { symbol_t *cursymbol; - cursymbol = curnode->links.sle_next->symbol; + cursymbol = SLIST_NEXT(curnode, links)->symbol; if ((mask && (cursymbol->info.minfo->mask > symbol->info.minfo->mask)) || (!mask &&(cursymbol->info.rinfo->address > @@ -259,7 +259,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how) break; } } - curnode = curnode->links.sle_next; + curnode = SLIST_NEXT(curnode, links); } } else { SLIST_INSERT_HEAD(symlist, newnode, links); @@ -271,9 +271,9 @@ symlist_free(symlist_t *symlist) { symbol_node_t *node1, *node2; - node1 = symlist->slh_first; + node1 = SLIST_FIRST(symlist); while (node1 != NULL) { - node2 = node1->links.sle_next; + node2 = SLIST_NEXT(node1, links); free(node1); node1 = node2; } @@ -287,7 +287,7 @@ symlist_merge(symlist_t *symlist_dest, symlist_t *symlist_src1, symbol_node_t *node; *symlist_dest = *symlist_src1; - while((node = symlist_src2->slh_first) != NULL) { + while((node = SLIST_FIRST(symlist_src2)) != NULL) { SLIST_REMOVE_HEAD(symlist_src2, links); SLIST_INSERT_HEAD(symlist_dest, node, links); } @@ -357,28 +357,28 @@ symtable_dump(FILE *ofile) } /* Put in the masks and bits */ - while (masks.slh_first != NULL) { + while (SLIST_FIRST(&masks) != NULL) { symbol_node_t *curnode; symbol_node_t *regnode; char *regname; - curnode = masks.slh_first; + curnode = SLIST_FIRST(&masks); SLIST_REMOVE_HEAD(&masks, links); regnode = - curnode->symbol->info.minfo->symrefs.slh_first; + SLIST_FIRST(&curnode->symbol->info.minfo->symrefs); regname = regnode->symbol->name; regnode = symlist_search(®isters, regname); SLIST_INSERT_AFTER(regnode, curnode, links); } /* Add the aliases */ - while (aliases.slh_first != NULL) { + while (SLIST_FIRST(&aliases) != NULL) { symbol_node_t *curnode; symbol_node_t *regnode; char *regname; - curnode = aliases.slh_first; + curnode = SLIST_FIRST(&aliases); SLIST_REMOVE_HEAD(&aliases, links); regname = curnode->symbol->info.ainfo->parent->name; @@ -391,13 +391,13 @@ symtable_dump(FILE *ofile) "/* * DO NOT EDIT - This file is automatically generated. */\n"); - while (registers.slh_first != NULL) { + while (SLIST_FIRST(®isters) != NULL) { symbol_node_t *curnode; u_int8_t value; char *tab_str; char *tab_str2; - curnode = registers.slh_first; + curnode = SLIST_FIRST(®isters); SLIST_REMOVE_HEAD(®isters, links); switch(curnode->symbol->type) { case REGISTER: @@ -439,10 +439,10 @@ symtable_dump(FILE *ofile) } fprintf(ofile, "\n\n"); - while (constants.slh_first != NULL) { + while (SLIST_FIRST(&constants) != NULL) { symbol_node_t *curnode; - curnode = constants.slh_first; + curnode = SLIST_FIRST(&constants); SLIST_REMOVE_HEAD(&constants, links); fprintf(ofile, "#define\t%-8s\t0x%02x\n", curnode->symbol->name, @@ -453,10 +453,10 @@ symtable_dump(FILE *ofile) fprintf(ofile, "\n\n/* Downloaded Constant Definitions */\n"); - while (download_constants.slh_first != NULL) { + while (SLIST_FIRST(&download_constants) != NULL) { symbol_node_t *curnode; - curnode = download_constants.slh_first; + curnode = SLIST_FIRST(&download_constants); SLIST_REMOVE_HEAD(&download_constants, links); fprintf(ofile, "#define\t%-8s\t0x%02x\n", curnode->symbol->name, diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index 058c304dc911..9f1b859adc95 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -2249,7 +2249,7 @@ ASR_sync ( * issuing a shutdown or an adapter reset). */ if ((sc != (Asr_softc_t *)NULL) - && (sc->ha_ccb.lh_first != (struct ccb_hdr *)NULL) + && (LIST_FIRST(&sc->ha_ccb) != (struct ccb_hdr *)NULL) && ((TID = ASR_getTid (sc, bus, target, lun)) != (tid_t)-1) && (TID != (tid_t)0)) { defAlignLong(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE,Message); diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 108518e7996a..b756baef480d 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -3012,8 +3012,8 @@ tulip_addr_filter( #endif multicnt = 0; - for (ifma = sc->tulip_if.if_multiaddrs.lh_first; ifma != NULL; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&sc->tulip_if.if_multiaddrs); ifma != NULL; + ifma = LIST_NEXT(ifma, ifma_link)) { if (ifma->ifma_addr->sa_family == AF_LINK) multicnt++; @@ -3041,8 +3041,8 @@ tulip_addr_filter( */ bzero(sc->tulip_setupdata, sizeof(sc->tulip_setupdata)); - for (ifma = sc->tulip_if.if_multiaddrs.lh_first; ifma != NULL; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&sc->tulip_if.if_multiaddrs); ifma != NULL; + ifma = LIST_NEXT(ifma, ifma_link)) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; @@ -3092,8 +3092,8 @@ tulip_addr_filter( /* * Else can get perfect filtering for 16 addresses. */ - for (ifma = sc->tulip_if.if_multiaddrs.lh_first; ifma != NULL; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&sc->tulip_if.if_multiaddrs); ifma != NULL; + ifma = LIST_NEXT(ifma, ifma_link)) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; addrp = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 08e7cc1e86b5..700f193dbb20 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -3286,8 +3286,8 @@ ds_getmcaf(sc, mcaf) mcaf[0] = 0; mcaf[1] = 0; - for (ifma = sc->arpcom.ac_if.if_multiaddrs.lh_first; ifma; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&sc->arpcom.ac_if.if_multiaddrs); ifma; + ifma = LIST_NEXT(ifma, ifma_link)) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; index = ds_crc(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)) diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c index a781251cf477..d67b453e4017 100644 --- a/sys/dev/eisa/eisaconf.c +++ b/sys/dev/eisa/eisaconf.c @@ -539,12 +539,12 @@ eisa_add_resvaddr(struct eisa_device *e_dev, struct resvlist *head, u_long base, reservation->size = size; reservation->flags = flags; - if (!head->lh_first) { + if (!LIST_FIRST(head)) { LIST_INSERT_HEAD(head, reservation, links); } else { resvaddr_t *node; - for(node = head->lh_first; node; node = node->links.le_next) { + LIST_FOREACH(node, head, links) { if (node->addr > reservation->addr) { /* * List is sorted in increasing @@ -564,7 +564,7 @@ eisa_add_resvaddr(struct eisa_device *e_dev, struct resvlist *head, u_long base, return (EEXIST); } - if (!node->links.le_next) { + if (!LIST_NEXT(node, links)) { LIST_INSERT_AFTER(node, reservation, links); break; } diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c index 3ff0f5be81d4..2a3dcfdd4e71 100644 --- a/sys/dev/ex/if_ex.c +++ b/sys/dev/ex/if_ex.c @@ -282,7 +282,7 @@ ex_init(void *xsc) DODEBUG(Start_End, printf("ex_init%d: start\n", ifp->if_unit);); - if (ifp->if_addrhead.tqh_first == NULL) { + if (TAILQ_FIRST(&ifp->if_addrhead) == NULL) { return; } s = splimp(); diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c index 3e789b4cc3de..e5a49d0dc6b4 100644 --- a/sys/dev/fe/if_fe.c +++ b/sys/dev/fe/if_fe.c @@ -2120,8 +2120,8 @@ fe_mcaf ( struct fe_softc *sc ) struct ifmultiaddr *ifma; filter = fe_filter_nothing; - for (ifma = sc->arpcom.ac_if.if_multiaddrs.lh_first; ifma; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&sc->arpcom.ac_if.if_multiaddrs); ifma; + ifma = LIST_NEXT(ifma, ifma_link)) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; index = fe_hash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c index ebebabb43729..3f7033d6f270 100644 --- a/sys/dev/ie/if_ie.c +++ b/sys/dev/ie/if_ie.c @@ -2150,8 +2150,8 @@ ie_mc_reset(int unit) * Step through the list of addresses. */ ie->mcast_count = 0; - for (ifma = ie->arpcom.ac_if.if_multiaddrs.lh_first; ifma; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&ie->arpcom.ac_if.if_multiaddrs); ifma; + ifma = LIST_NEXT(ifma, ifma_link)) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; diff --git a/sys/dev/pdq/pdq_ifsubr.c b/sys/dev/pdq/pdq_ifsubr.c index ac9d3d2cb582..3c437a8e78cf 100644 --- a/sys/dev/pdq/pdq_ifsubr.c +++ b/sys/dev/pdq/pdq_ifsubr.c @@ -227,8 +227,8 @@ pdq_os_addr_fill( pdq_softc_t *sc = (pdq_softc_t *) pdq->pdq_os_ctx; struct ifmultiaddr *ifma; - for (ifma = sc->sc_if.if_multiaddrs.lh_first; ifma && num_addrs > 0; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&sc->sc_if.if_multiaddrs); ifma && num_addrs > 0; + ifma = LIST_NEXT(ifma, ifma_link)) { char *mcaddr; if (ifma->ifma_addr->sa_family != AF_LINK) continue; diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index ff01bf0c5a41..29f3fe316648 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -450,7 +450,7 @@ static void sf_setmulti(sc) i = 1; /* First find the tail of the list. */ LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_link.le_next == NULL) + if (LIST_NEXT(ifma, ifma_link) == NULL) break; } /* Now traverse the list backwards. */ diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index a0dc45acf1d4..a6dba7966aa2 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -559,7 +559,7 @@ static void sk_setmulti(sc_if) i = 1; /* First find the tail of the list. */ LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_link.le_next == NULL) + if (LIST_NEXT(ifma, ifma_link) == NULL) break; } /* Now traverse the list backwards. */ diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c index 2b3902456e79..e9a856d80a0f 100644 --- a/sys/dev/sn/if_sn.c +++ b/sys/dev/sn/if_sn.c @@ -1461,8 +1461,8 @@ sn_getmcf(struct arpcom *ac, u_char *mcf) bzero(mcf, MCFSZ); - for (ifma = ac->ac_if.if_multiaddrs.lh_first; ifma; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&ac->ac_if.if_multiaddrs); ifma; + ifma = LIST_NEXT(ifma, ifma_link)) { if (ifma->ifma_addr->sa_family != AF_LINK) return 0; index = smc_crc(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)) & 0x3f; diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index cb28d01c4e10..1d52547e29be 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -1073,8 +1073,8 @@ static void ti_setmulti(sc) CSR_WRITE_4(sc, TI_MB_HOSTINTR, 1); /* First, zot all the existing filters. */ - while (sc->ti_mc_listhead.slh_first != NULL) { - mc = sc->ti_mc_listhead.slh_first; + while (SLIST_FIRST(&sc->ti_mc_listhead) != NULL) { + mc = SLIST_FIRST(&sc->ti_mc_listhead); ti_del_mcast(sc, &mc->mc_addr); SLIST_REMOVE_HEAD(&sc->ti_mc_listhead, mc_entries); free(mc, M_DEVBUF); diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 1628268f3c5b..761a45879e76 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -985,7 +985,7 @@ uhci_intr(void *arg) * We scan all interrupt descriptors to see if any have * completed. */ - for (ii = LIST_FIRST(&sc->sc_intrhead); ii; ii = LIST_NEXT(ii, list)) + LIST_FOREACH(ii, &sc->sc_intrhead, list) uhci_check_intr(sc, ii); DPRINTFN(10, ("%s: uhci_intr: exit\n", USBDEVNAME(sc->sc_bus.bdev))); diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c index e1aec042e3cd..67a50d70e701 100644 --- a/sys/dev/wl/if_wl.c +++ b/sys/dev/wl/if_wl.c @@ -682,7 +682,7 @@ wlinit(void *xsc) printf("wl%d: entered wlinit()\n",sc->unit); #endif #if defined(__FreeBSD__) && __FreeBSD_version >= 300000 - if (ifp->if_addrhead.tqh_first == (struct ifaddr *)0) { + if (TAILQ_FIRST(&ifp->if_addrhead) == (struct ifaddr *)0) { #else if (ifp->if_addrlist == (struct ifaddr *)0) { #endif @@ -2060,8 +2060,8 @@ wlconfig(int unit) outw(PIOP1(base), AC_MCSETUP|AC_CW_EL); /* ac_command */ outw(PIOR1(base), OFFSET_CU + 8); #if defined(__FreeBSD__) && __FreeBSD_version >= 300000 - for (ifma = sc->wl_if.if_multiaddrs.lh_first; ifma; - ifma = ifma->ifma_link.le_next) { + for (ifma = LIST_FIRST(&sc->wl_if.if_multiaddrs); ifma; + ifma = LIST_NEXT(ifma, ifma_link)) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c index 78742baed907..d0e1dd22b222 100644 --- a/sys/dev/xe/if_xe.c +++ b/sys/dev/xe/if_xe.c @@ -1590,10 +1590,10 @@ xe_setmulti(struct xe_softc *scp) { int count; ifp = &scp->arpcom.ac_if; - maddr = ifp->if_multiaddrs.lh_first; + maddr = LIST_FIRST(&ifp->if_multiaddrs); /* Get length of multicast list */ - for (count = 0; maddr != NULL; maddr = maddr->ifma_link.le_next, count++); + for (count = 0; maddr != NULL; maddr = LIST_NEXT(maddr, ifma_link), count++); if ((ifp->if_flags & IFF_PROMISC) || (ifp->if_flags & IFF_ALLMULTI) || (count > 9)) { /* @@ -1643,7 +1643,7 @@ xe_setaddrs(struct xe_softc *scp) { u_int8_t *addr; u_int8_t page, slot, byte, i; - maddr = scp->arpcom.ac_if.if_multiaddrs.lh_first; + maddr = LIST_FIRST(&scp->arpcom.ac_if.if_multiaddrs); XE_SELECT_PAGE(page = 0x50); @@ -1653,7 +1653,7 @@ xe_setaddrs(struct xe_softc *scp) { addr = (u_int8_t *)(&scp->arpcom.ac_enaddr); else { while (maddr != NULL && maddr->ifma_addr->sa_family != AF_LINK) - maddr = maddr->ifma_link.le_next; + maddr = LIST_NEXT(maddr, ifma_link); if (maddr != NULL) addr = LLADDR((struct sockaddr_dl *)maddr->ifma_addr); else |
