CHECK: Prefer using the BIT macro #27: FILE: tools/include/linux/btf_ids.h:14: +#define BTF_SET8_KFUNCS (1 << 0) ERROR: Macros with complex values should be enclosed in parentheses #47: FILE: tools/include/linux/btf_ids.h:42: +#define ____BTF_ID(symbol, word) \ asm( \ ".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \ ".local " #symbol " ; \n" \ WARNING: Argument 'word' is not used in function-like macro #47: FILE: tools/include/linux/btf_ids.h:42: +#define ____BTF_ID(symbol, word) \ asm( \ ".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \ ".local " #symbol " ; \n" \ WARNING: unnecessary whitespace before a quoted newline #85: FILE: tools/include/linux/btf_ids.h:91: +".balign 4, 0; \n" \ ERROR: Macros with multiple statements should be enclosed in a do - while loop #114: FILE: tools/include/linux/btf_ids.h:192: +#define __BTF_SET8_START(name, scope, flags) \ +__BTF_ID_LIST(name, local) \ +asm( \ +".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \ +"." #scope " __BTF_ID__set8__" #name "; \n" \ +"__BTF_ID__set8__" #name ":; \n" \ +".zero 4 \n" \ +".long " __stringify(flags) "\n" \ +".popsection; \n"); WARNING: macros should not use a trailing semicolon #114: FILE: tools/include/linux/btf_ids.h:192: +#define __BTF_SET8_START(name, scope, flags) \ +__BTF_ID_LIST(name, local) \ +asm( \ +".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \ +"." #scope " __BTF_ID__set8__" #name "; \n" \ +"__BTF_ID__set8__" #name ":; \n" \ +".zero 4 \n" \ +".long " __stringify(flags) "\n" \ +".popsection; \n"); WARNING: unnecessary whitespace before a quoted newline #117: FILE: tools/include/linux/btf_ids.h:195: +".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \ WARNING: unnecessary whitespace before a quoted newline #118: FILE: tools/include/linux/btf_ids.h:196: +"." #scope " __BTF_ID__set8__" #name "; \n" \ WARNING: unnecessary whitespace before a quoted newline #119: FILE: tools/include/linux/btf_ids.h:197: +"__BTF_ID__set8__" #name ":; \n" \ WARNING: unnecessary whitespace before a quoted newline #120: FILE: tools/include/linux/btf_ids.h:198: +".zero 4 \n" \ WARNING: unnecessary whitespace before a quoted newline #122: FILE: tools/include/linux/btf_ids.h:200: +".popsection; \n"); WARNING: macros should not use a trailing semicolon #127: FILE: tools/include/linux/btf_ids.h:205: +#define BTF_SET8_END(name) \ +asm( \ +".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \ +".size __BTF_ID__set8__" #name ", .-" #name " \n" \ +".popsection; \n"); \ +extern struct btf_id_set8 name; WARNING: unnecessary whitespace before a quoted newline #129: FILE: tools/include/linux/btf_ids.h:207: +".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \ WARNING: unnecessary whitespace before a quoted newline #130: FILE: tools/include/linux/btf_ids.h:208: +".size __BTF_ID__set8__" #name ", .-" #name " \n" \ WARNING: unnecessary whitespace before a quoted newline #131: FILE: tools/include/linux/btf_ids.h:209: +".popsection; \n"); \ WARNING: macros should not use a trailing semicolon #143: FILE: tools/include/linux/btf_ids.h:220: +#define BTF_ID_LIST(name) static u32 __maybe_unused name[64]; WARNING: Argument 'prefix' is not used in function-like macro #145: FILE: tools/include/linux/btf_ids.h:222: +#define BTF_ID_FLAGS(prefix, name, ...) WARNING: Argument 'name' is not used in function-like macro #145: FILE: tools/include/linux/btf_ids.h:222: +#define BTF_ID_FLAGS(prefix, name, ...) WARNING: line length of 83 exceeds 80 columns #153: FILE: tools/include/linux/btf_ids.h:230: +#define BTF_SET8_START(name) static struct btf_id_set8 __maybe_unused name = { 0 }; WARNING: macros should not use a trailing semicolon #153: FILE: tools/include/linux/btf_ids.h:230: +#define BTF_SET8_START(name) static struct btf_id_set8 __maybe_unused name = { 0 }; WARNING: Argument 'name' is not used in function-like macro #154: FILE: tools/include/linux/btf_ids.h:231: +#define BTF_SET8_END(name) WARNING: line length of 108 exceeds 80 columns #155: FILE: tools/include/linux/btf_ids.h:232: +#define BTF_KFUNCS_START(name) static struct btf_id_set8 __maybe_unused name = { .flags = BTF_SET8_KFUNCS }; WARNING: macros should not use a trailing semicolon #155: FILE: tools/include/linux/btf_ids.h:232: +#define BTF_KFUNCS_START(name) static struct btf_id_set8 __maybe_unused name = { .flags = BTF_SET8_KFUNCS }; WARNING: Argument 'name' is not used in function-like macro #156: FILE: tools/include/linux/btf_ids.h:233: +#define BTF_KFUNCS_END(name) total: 2 errors, 21 warnings, 1 checks, 150 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 6139fd75b21d ("tools/bpf, selftests/bpf : Sync btf_ids.h to tools") 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.