WARNING: externs should be avoided in .c files #77: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:252: +extern void usdt_2(void); WARNING: line length of 87 exceeds 80 columns #116: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:291: + skel->links.usdt_executed = bpf_program__attach_usdt(skel->progs.usdt_executed, WARNING: line length of 82 exceeds 80 columns #117: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:292: + 0 /*self*/, "/proc/self/exe", CHECK: Alignment should match open parenthesis #117: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:292: + skel->links.usdt_executed = bpf_program__attach_usdt(skel->progs.usdt_executed, + 0 /*self*/, "/proc/self/exe", WARNING: line length of 89 exceeds 80 columns #118: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:293: + "optimized_attach", "usdt_1", NULL); WARNING: line length of 82 exceeds 80 columns #119: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:294: + if (!ASSERT_OK_PTR(skel->links.usdt_executed, "bpf_program__attach_usdt")) WARNING: line length of 87 exceeds 80 columns #137: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:312: + skel->links.usdt_executed = bpf_program__attach_usdt(skel->progs.usdt_executed, WARNING: line length of 82 exceeds 80 columns #138: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:313: + 0 /*self*/, "/proc/self/exe", CHECK: Alignment should match open parenthesis #138: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:313: + skel->links.usdt_executed = bpf_program__attach_usdt(skel->progs.usdt_executed, + 0 /*self*/, "/proc/self/exe", WARNING: line length of 89 exceeds 80 columns #139: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:314: + "optimized_attach", "usdt_2", NULL); WARNING: line length of 82 exceeds 80 columns #140: FILE: tools/testing/selftests/bpf/prog_tests/usdt.c:315: + if (!ASSERT_OK_PTR(skel->links.usdt_executed, "bpf_program__attach_usdt")) ERROR: Macros with complex values should be enclosed in parentheses #197: FILE: tools/testing/selftests/bpf/usdt_1.c:7: +#define USDT_NOP .byte 0x90, 0x0f, 0x1f, 0x44, 0x00, 0x00 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. WARNING: Prefer __aligned(16) over __attribute__((aligned(16))) #200: FILE: tools/testing/selftests/bpf/usdt_1.c:10: +__attribute__((aligned(16))) WARNING: Prefer __aligned(16) over __attribute__((aligned(16))) #219: FILE: tools/testing/selftests/bpf/usdt_2.c:9: +__attribute__((aligned(16))) total: 1 errors, 11 warnings, 2 checks, 158 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. Commit 3cd299de9e1c ("selftests/bpf: Add test for checking correct nop of optimized usdt") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE FILE_PATH_CHANGES 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.