summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc/hwpmc_octeon.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-21 19:40:10 +0000
committerpfg <pfg@FreeBSD.org>2016-04-21 19:40:10 +0000
commit42747553f484b2cfcfb919643e1749c9ad782766 (patch)
treeeafad75827e36e967c59edef51d49100cec9cad4 /sys/dev/hwpmc/hwpmc_octeon.c
parentb98e219695917390f708c219fcd6bc8938cea0e2 (diff)
downloadFreeBSD-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/dev/hwpmc/hwpmc_octeon.c')
-rw-r--r--sys/dev/hwpmc/hwpmc_octeon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/hwpmc/hwpmc_octeon.c b/sys/dev/hwpmc/hwpmc_octeon.c
index b614573..7518282 100644
--- a/sys/dev/hwpmc/hwpmc_octeon.c
+++ b/sys/dev/hwpmc/hwpmc_octeon.c
@@ -103,8 +103,7 @@ const struct mips_event_code_map mips_event_codes[] =
{ PMC_EV_OCTEON_SYNCW, MIPS_CTR_ALL, CVMX_CORE_PERF_SYNCW },
};
-const int mips_event_codes_size =
- sizeof(mips_event_codes) / sizeof(mips_event_codes[0]);
+const int mips_event_codes_size = nitems(mips_event_codes);
struct mips_pmc_spec mips_pmc_spec = {
.ps_cpuclass = PMC_CLASS_OCTEON,
OpenPOWER on IntegriCloud