WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22: new file mode 100644 ERROR: trailing whitespace #38: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:12: +^I$ ERROR: code indent should use tabs where possible #41: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:15: +^I return;$ ERROR: trailing whitespace #42: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:16: +^I$ ERROR: code indent should use tabs where possible #45: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:19: +^I goto out;$ ERROR: trailing whitespace #46: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:20: +^I$ ERROR: code indent should use tabs where possible #50: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:24: +^I goto out;$ ERROR: trailing whitespace #51: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:25: +^I$ WARNING: please, no spaces at the start of a line #58: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:32: + bpf_termination__destroy(skel);$ ERROR: Macros with complex values should be enclosed in parentheses #79: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:8: +#define LOOPS_CNT 1 << 10 BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. CHECK: Prefer using the BIT macro #79: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:8: +#define LOOPS_CNT 1 << 10 ERROR: open brace '{' following function definitions go on the next line #81: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:10: +static int callback_fn4(void *ctx) { ERROR: open brace '{' following function definitions go on the next line #85: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:14: +static int callback_fn3(void *ctx) { CHECK: Please don't use multiple blank lines #90: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:19: + + ERROR: open brace '{' following function definitions go on the next line #91: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:20: +static int callback_fn2(void *ctx) { ERROR: open brace '{' following function definitions go on the next line #96: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:25: +static int callback_fn(void *ctx) { ERROR: open brace '{' following function definitions go on the next line #102: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:31: +int bpf_loop_lr(void *ctx) { total: 13 errors, 2 warnings, 2 checks, 77 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile Commit 2ab1f5766bec ("selftests/bpf: Adds selftests to check termination of long running nested bpf loops") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.