CHECK: Prefer using the BIT macro #53: FILE: kernel/bpf/helpers.c:3709: +#define MAX_UNCOMPRESSED_BUF_SIZE (1 << 28) CHECK: Prefer using the BIT macro #55: FILE: kernel/bpf/helpers.c:3711: +#define CHUNK_SIZE (1 << 23) WARNING: line length of 84 exceeds 80 columns #58: FILE: kernel/bpf/helpers.c:3714: + * At present, one global allocator for decompression. Later if needed, changing the CHECK: Alignment should match open parenthesis #93: FILE: kernel/bpf/helpers.c:3749: +static int decompress_mem_allocator_handover(struct decompress_mem_allocator *a, + struct mem_range_result *range) CHECK: Lines should not end with a '(' #124: FILE: kernel/bpf/helpers.c:3780: +static int decompress_mem_allocator_init( WARNING: line length of 93 exceeds 80 columns #128: FILE: kernel/bpf/helpers.c:3784: + unsigned long sz = (MAX_UNCOMPRESSED_BUF_SIZE >> PAGE_SHIFT) * sizeof(struct page *); WARNING: line length of 85 exceeds 80 columns #141: FILE: kernel/bpf/helpers.c:3797: +static void decompress_mem_allocator_fini(struct decompress_mem_allocator *allocator) CHECK: multiple assignments should be avoided #169: FILE: kernel/bpf/helpers.c:3825: + a->chunk_start = a->chunk_cur = vmap_decompressed_chunk(); WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants #175: FILE: kernel/bpf/helpers.c:3831: + BUG_ON(free < 0); WARNING: line length of 85 exceeds 80 columns #182: FILE: kernel/bpf/helpers.c:3838: + if (unlikely((a->pg_idx >= MAX_UNCOMPRESSED_BUF_SIZE >> PAGE_SHIFT))) CHECK: multiple assignments should be avoided #193: FILE: kernel/bpf/helpers.c:3849: + a->chunk_start = a->chunk_cur = vmap_decompressed_chunk(); WARNING: line length of 92 exceeds 80 columns #203: FILE: kernel/bpf/helpers.c:3859: +__bpf_kfunc struct mem_range_result *bpf_decompress(char *image_gz_payload, int image_gz_sz) WARNING: line length of 81 exceeds 80 columns #228: FILE: kernel/bpf/helpers.c:3884: + ret = copy_from_kernel_nofault(input_buf, image_gz_payload, image_gz_sz); CHECK: Alignment should match open parenthesis #233: FILE: kernel/bpf/helpers.c:3889: + pr_err("Error when copying from 0x%p, size:0x%x\n", + image_gz_payload, image_gz_sz); CHECK: Alignment should match open parenthesis #247: FILE: kernel/bpf/helpers.c:3903: + ret = decompressor(input_buf, image_gz_sz, NULL, flush, + NULL, NULL, NULL); total: 0 errors, 7 warnings, 8 checks, 244 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 6aac6e8c9ee7 ("bpf: Introduce decompressor kfunc") 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. total: 0 errors, 7 warnings, 8 checks, 244 lines checked