WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #48: new file mode 100644 WARNING: line length of 81 exceeds 80 columns #181: FILE: tools/kexec/zboot_parser_bpf.c:41: + * This function ensures that the sections .rodata, .data .bss and .rodata.str1.1 WARNING: Prefer __used over __attribute__((used)) #184: FILE: tools/kexec/zboot_parser_bpf.c:44: +__attribute__((used)) static int dummy(void) WARNING: line length of 107 exceeds 80 columns #186: FILE: tools/kexec/zboot_parser_bpf.c:46: + static const char res_kernel[16] __attribute__((used, section(".rodata"))) = KEXEC_RES_KERNEL_NAME; WARNING: Prefer __used over __attribute__((used)) #186: FILE: tools/kexec/zboot_parser_bpf.c:46: + static const char res_kernel[16] __attribute__((used, section(".rodata"))) = KEXEC_RES_KERNEL_NAME; WARNING: Prefer __section(".rodata") over __attribute__((section(".rodata"))) #186: FILE: tools/kexec/zboot_parser_bpf.c:46: + static const char res_kernel[16] __attribute__((used, section(".rodata"))) = KEXEC_RES_KERNEL_NAME; WARNING: line length of 100 exceeds 80 columns #187: FILE: tools/kexec/zboot_parser_bpf.c:47: + static char local_name[16] __attribute__((used, section(".data"))) = KEXEC_RES_CMDLINE_NAME; WARNING: Prefer __used over __attribute__((used)) #187: FILE: tools/kexec/zboot_parser_bpf.c:47: + static char local_name[16] __attribute__((used, section(".data"))) = KEXEC_RES_CMDLINE_NAME; WARNING: Prefer __section(".data") over __attribute__((section(".data"))) #187: FILE: tools/kexec/zboot_parser_bpf.c:47: + static char local_name[16] __attribute__((used, section(".data"))) = KEXEC_RES_CMDLINE_NAME; WARNING: Prefer __used over __attribute__((used)) #188: FILE: tools/kexec/zboot_parser_bpf.c:48: + static char res_cmdline[16] __attribute__((used, section(".bss"))); WARNING: Prefer __section(".bss") over __attribute__((section(".bss"))) #188: FILE: tools/kexec/zboot_parser_bpf.c:48: + static char res_cmdline[16] __attribute__((used, section(".bss"))); WARNING: line length of 83 exceeds 80 columns #194: FILE: tools/kexec/zboot_parser_bpf.c:54: +extern int bpf_copy_to_kernel(const char *name, char *buf, int size) __weak __ksym; WARNING: line length of 102 exceeds 80 columns #195: FILE: tools/kexec/zboot_parser_bpf.c:55: +extern struct mem_range_result *bpf_decompress(char *image_gz_payload, int image_gz_sz) __weak __ksym; WARNING: externs should be avoided in .c files #195: FILE: tools/kexec/zboot_parser_bpf.c:55: +extern struct mem_range_result *bpf_decompress(char *image_gz_payload, int image_gz_sz) __weak __ksym; WARNING: line length of 83 exceeds 80 columns #196: FILE: tools/kexec/zboot_parser_bpf.c:56: +extern int bpf_mem_range_result_put(struct mem_range_result *result) __weak __ksym; CHECK: Please don't use multiple blank lines #198: FILE: tools/kexec/zboot_parser_bpf.c:58: + + CHECK: Please don't use multiple blank lines #200: FILE: tools/kexec/zboot_parser_bpf.c:60: + + WARNING: Prefer __packed over __attribute__((packed)) #211: FILE: tools/kexec/zboot_parser_bpf.c:71: +} __attribute__((packed)); CHECK: Please don't use multiple blank lines #213: FILE: tools/kexec/zboot_parser_bpf.c:73: + + CHECK: Unnecessary parentheses around 'context->image_sz > MAX_RECORD_SIZE' #224: FILE: tools/kexec/zboot_parser_bpf.c:84: + if (!context->image || (context->image_sz > MAX_RECORD_SIZE)) { WARNING: line length of 87 exceeds 80 columns #225: FILE: tools/kexec/zboot_parser_bpf.c:85: + bpf_printk("Err: image size is greater than 0x%lx\n", MAX_RECORD_SIZE); WARNING: line length of 81 exceeds 80 columns #232: FILE: tools/kexec/zboot_parser_bpf.c:92: + * R2 is ARG_CONST_ALLOC_SIZE_OR_ZERO, should be decided at compling time ERROR: code indent should use tabs where possible #236: FILE: tools/kexec/zboot_parser_bpf.c:96: +^I ^Ibpf_printk("Err: fail to reserve ringbuf to parse zboot header\n");$ WARNING: please, no space before tabs #236: FILE: tools/kexec/zboot_parser_bpf.c:96: +^I ^Ibpf_printk("Err: fail to reserve ringbuf to parse zboot header\n");$ WARNING: line length of 90 exceeds 80 columns #240: FILE: tools/kexec/zboot_parser_bpf.c:100: + bpf_probe_read((void *)buf, sizeof(struct linux_pe_zboot_header), context->image); CHECK: Alignment should match open parenthesis #243: FILE: tools/kexec/zboot_parser_bpf.c:103: + if (!!__builtin_memcmp(&zboot_header->image_type, "zimg", + sizeof(zboot_header->image_type))) { WARNING: line length of 97 exceeds 80 columns #251: FILE: tools/kexec/zboot_parser_bpf.c:111: + bpf_printk("zboot image payload offset=0x%x, size=0x%x\n", payload_offset, payload_size); WARNING: Missing a blank line after declarations #251: FILE: tools/kexec/zboot_parser_bpf.c:111: + unsigned int payload_size = zboot_header->payload_size; + bpf_printk("zboot image payload offset=0x%x, size=0x%x\n", payload_offset, payload_size); ERROR: space prohibited before that close parenthesis ')' #258: FILE: tools/kexec/zboot_parser_bpf.c:118: + if (payload_size >= MAX_RECORD_SIZE ) { WARNING: line length of 83 exceeds 80 columns #264: FILE: tools/kexec/zboot_parser_bpf.c:124: + bpf_probe_read((void *)buf, payload_size, context->image + payload_offset); WARNING: Missing a blank line after declarations #267: FILE: tools/kexec/zboot_parser_bpf.c:127: + struct mem_range_result *r = bpf_decompress(buf, payload_size - 4); + if (!r) { ERROR: trailing whitespace #280: FILE: tools/kexec/zboot_parser_bpf.c:140: +^I$ WARNING: line length of 83 exceeds 80 columns #281: FILE: tools/kexec/zboot_parser_bpf.c:141: + /* Since the decompressed size is bigger than original, no need to clean */ WARNING: Missing a blank line after declarations #287: FILE: tools/kexec/zboot_parser_bpf.c:147: + const char *res_name = local_name; + bpf_copy_to_kernel(res_name, buf, image_sz); total: 3 errors, 26 warnings, 5 checks, 240 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 e42970036cab ("tools/kexec: Introduce a bpf-prog to parse zboot image format") 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.