You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the array_size.cocci warning in tools/testing/selftests/bpf/
Use `ARRAY_SIZE(arr)` instead of forms like `sizeof(arr)/sizeof(arr[0])`.
syscall.c and test_rdonly_maps.c don't contain header files which
implement ARRAY_SIZE() macro. So I add `#include <linux/kernel.h>`,
in which ARRAY_SIZE(arr) not only calculates the size of `arr`, but also
checks that `arr` is really an array (using __must_be_array(arr)).
Signed-off-by: Guo Zhengkui <[email protected]>
0 commit comments