diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-19 23:37:24 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-19 23:37:24 +0000 |
commit | e2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548 (patch) | |
tree | 346d2ff1b645f831d2f412a7a4be3f6eb1c711b4 /sys/dev/bwi/bwirf.c | |
parent | ea58c6f194dc25f7e2e87f7a36de9b2da5b8b90c (diff) | |
download | FreeBSD-src-e2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548.zip FreeBSD-src-e2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548.tar.gz |
sys/dev: use our nitems() macro when it is avaliable through param.h.
No functional change, only trivial cases are done in this sweep,
Drivers that can get further enhancements will be done independently.
Discussed in: freebsd-current
Diffstat (limited to 'sys/dev/bwi/bwirf.c')
-rw-r--r-- | sys/dev/bwi/bwirf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/bwi/bwirf.c b/sys/dev/bwi/bwirf.c index 341e929..e65a80d 100644 --- a/sys/dev/bwi/bwirf.c +++ b/sys/dev/bwi/bwirf.c @@ -1018,8 +1018,7 @@ bwi_rf_calibval(struct bwi_mac *mac) val = RF_READ(mac, BWI_RFR_BBP_ATTEN); idx = __SHIFTOUT(val, BWI_RFR_BBP_ATTEN_CALIB_IDX); - KASSERT(idx < (int)(sizeof(rf_calibvals) / sizeof(rf_calibvals[0])), - ("idx %d", idx)); + KASSERT(idx < (int)nitems(rf_calibvals), ("idx %d", idx)); calib = rf_calibvals[idx] << 1; if (val & BWI_RFR_BBP_ATTEN_CALIB_BIT) |