Address following coccicheck warnings: ./tools/perf/tests/bpf.c:316:22-23: WARNING: Use ARRAY_SIZE.
Unified · Split
| @@ -297,7 +297,7 @@ static int check_env(void) · 296 unmodified lines | |||
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | err = bpf_load_program(BPF_PROG_TYPE_KPROBE, insns, | 299 | err = bpf_load_program(BPF_PROG_TYPE_KPROBE, insns, |
| 300 | sizeof(insns) / sizeof(insns[0]), | 300 | ARRAY_SIZE(insns), |
| 301 | license, kver_int, NULL, 0); | 301 | license, kver_int, NULL, 0); |
| 302 | if (err < 0) { | 302 | if (err < 0) { |
| 303 | pr_err("Missing basic BPF support, skip this test: %s\n", | 303 | pr_err("Missing basic BPF support, skip this test: %s\n", |