WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #24: new file mode 100644 ERROR: trailing whitespace #40: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:12: +^I$ ERROR: code indent should use tabs where possible #43: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:15: +^I return;$ ERROR: trailing whitespace #44: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:16: +^I$ ERROR: code indent should use tabs where possible #47: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:19: +^I goto out;$ ERROR: trailing whitespace #48: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:20: +^I$ ERROR: code indent should use tabs where possible #52: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:24: +^I goto out;$ ERROR: trailing whitespace #53: FILE: tools/testing/selftests/bpf/prog_tests/bpf_termination.c:25: +^I$ WARNING: please, no spaces at the start of a line #60: 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 #81: 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 #81: 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 #83: 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 #87: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:14: +static int callback_fn3(void *ctx) { CHECK: Blank lines aren't necessary after an open brace '{' #88: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:15: +static int callback_fn3(void *ctx) { + CHECK: Blank lines aren't necessary before a close brace '}' #92: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:19: + +} CHECK: Please don't use multiple blank lines #94: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:21: + + ERROR: open brace '{' following function definitions go on the next line #95: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:22: +static int callback_fn2(void *ctx) { CHECK: Blank lines aren't necessary after an open brace '{' #96: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:23: +static int callback_fn2(void *ctx) { + CHECK: Blank lines aren't necessary before a close brace '}' #100: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:27: + +} ERROR: open brace '{' following function definitions go on the next line #102: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:29: +static int callback_fn(void *ctx) { CHECK: Blank lines aren't necessary after an open brace '{' #103: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:30: +static int callback_fn(void *ctx) { + CHECK: Blank lines aren't necessary before a close brace '}' #107: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:34: + +} ERROR: open brace '{' following function definitions go on the next line #110: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:37: +int bpf_loop_lr(void *ctx) { CHECK: Blank lines aren't necessary after an open brace '{' #111: FILE: tools/testing/selftests/bpf/progs/bpf_termination.c:38: +int bpf_loop_lr(void *ctx) { + total: 13 errors, 2 warnings, 9 checks, 86 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 fc1e20daa610 ("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.