diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-21 19:40:10 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-21 19:40:10 +0000 |
commit | 42747553f484b2cfcfb919643e1749c9ad782766 (patch) | |
tree | eafad75827e36e967c59edef51d49100cec9cad4 /sys/mips | |
parent | b98e219695917390f708c219fcd6bc8938cea0e2 (diff) | |
download | FreeBSD-src-42747553f484b2cfcfb919643e1749c9ad782766.zip FreeBSD-src-42747553f484b2cfcfb919643e1749c9ad782766.tar.gz |
sys: use our nitems() macro when param.h is available.
This should cover all the remaining cases in the kernel.
Discussed in: freebsd-current
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/nlm/board.c | 4 | ||||
-rw-r--r-- | sys/mips/rmi/dev/nlge/if_nlge.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/mips/nlm/board.c b/sys/mips/nlm/board.c index 1cb50a2..bb335bf 100644 --- a/sys/mips/nlm/board.c +++ b/sys/mips/nlm/board.c @@ -105,10 +105,10 @@ nlm_get_vfbid_mapping(int vfbid) struct vfbid_tbl *p; if (nlm_is_xlp3xx()) { - nentries = sizeof(nlm3xx_vfbid)/sizeof(struct vfbid_tbl); + nentries = nitems(nlm3xx_vfbid); p = nlm3xx_vfbid; } else { - nentries = sizeof(nlm_vfbid)/sizeof(struct vfbid_tbl); + nentries = nitems(nlm_vfbid); p = nlm_vfbid; } diff --git a/sys/mips/rmi/dev/nlge/if_nlge.c b/sys/mips/rmi/dev/nlge/if_nlge.c index 9fa95c7..ff4810c 100644 --- a/sys/mips/rmi/dev/nlge/if_nlge.c +++ b/sys/mips/rmi/dev/nlge/if_nlge.c @@ -2404,7 +2404,7 @@ dump_fmn_cpu_credits_for_gmac(struct xlr_board_info *board, int gmac_id) int j, k, r, c; int n_gmac_buckets; - n_gmac_buckets = sizeof (gmac_bucket_ids) / sizeof (gmac_bucket_ids[0]); + n_gmac_buckets = nitems(gmac_bucket_ids); for (j = 0; j < 8; j++) { // for each cpu cc = board->credit_configs[j]; printf("Credits for Station CPU_%d ---> GMAC buckets (tx path)\n", j); @@ -2518,7 +2518,7 @@ dump_mii_regs(struct nlge_softc *sc) if (sc->mii_base == NULL || sc->mii_bus == NULL) return; - n_regs = sizeof (mii_regs) / sizeof (mii_regs[0]); + n_regs = nitems(mii_regs); for (i = 0; i < n_regs; i++) { printf("[mii_0x%x] = %x\n", mii_regs[i], nlge_mii_read_internal(sc->mii_base, sc->phy_addr, |