History

perf test bpf: Use ARRAY_CHECK() instead of ad-hoc equivalent, addressing array_size.cocci warning

Address following coccicheck warnings: ./tools/perf/tests/bpf.c:316:22-23: WARNING: Use ARRAY_SIZE.

Guo Zhengkui committed 5 years ago

Commit f08a8fc1 parent 27d113c1 file · +1 −1Browse files

Unified · Split

tools/perf/tests/bpf.c+1−1
@@ -297,7 +297,7 @@ static int check_env(void) · 296 unmodified lines
297297 }
298298
299299 err = bpf_load_program(BPF_PROG_TYPE_KPROBE, insns,
300− sizeof(insns) / sizeof(insns[0]),
300+ ARRAY_SIZE(insns),
301301 license, kver_int, NULL, 0);
302302 if (err < 0) {
303303 pr_err("Missing basic BPF support, skip this test: %s\n",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t