CHECK: Prefer using the BIT macro #51: FILE: kernel/bpf/helpers.c:3282: +#define MAX_UNCOMPRESSED_BUF_SIZE (1 << 28) CHECK: Prefer using the BIT macro #53: FILE: kernel/bpf/helpers.c:3284: +#define CHUNK_SIZE (1 << 23) WARNING: line length of 84 exceeds 80 columns #56: FILE: kernel/bpf/helpers.c:3287: + * At present, one global allocator for decompression. Later if needed, changing the CHECK: Alignment should match open parenthesis #91: FILE: kernel/bpf/helpers.c:3322: +static int decompress_mem_allocator_handover(struct decompress_mem_allocator *a, + struct mem_range_result *range) CHECK: Lines should not end with a '(' #122: FILE: kernel/bpf/helpers.c:3353: +static int decompress_mem_allocator_init( WARNING: line length of 93 exceeds 80 columns #126: FILE: kernel/bpf/helpers.c:3357: + unsigned long sz = (MAX_UNCOMPRESSED_BUF_SIZE >> PAGE_SHIFT) * sizeof(struct page *); WARNING: line length of 85 exceeds 80 columns #139: FILE: kernel/bpf/helpers.c:3370: +static void decompress_mem_allocator_fini(struct decompress_mem_allocator *allocator) CHECK: multiple assignments should be avoided #167: FILE: kernel/bpf/helpers.c:3398: + 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 #173: FILE: kernel/bpf/helpers.c:3404: + BUG_ON(free < 0); WARNING: line length of 85 exceeds 80 columns #180: FILE: kernel/bpf/helpers.c:3411: + if (unlikely((a->pg_idx >= MAX_UNCOMPRESSED_BUF_SIZE >> PAGE_SHIFT))) CHECK: multiple assignments should be avoided #191: FILE: kernel/bpf/helpers.c:3422: + a->chunk_start = a->chunk_cur = vmap_decompressed_chunk(); WARNING: line length of 92 exceeds 80 columns #201: FILE: kernel/bpf/helpers.c:3432: +__bpf_kfunc struct mem_range_result *bpf_decompress(char *image_gz_payload, int image_gz_sz) WARNING: line length of 81 exceeds 80 columns #226: FILE: kernel/bpf/helpers.c:3457: + ret = copy_from_kernel_nofault(input_buf, image_gz_payload, image_gz_sz); CHECK: Alignment should match open parenthesis #231: FILE: kernel/bpf/helpers.c:3462: + pr_err("Error when copying from 0x%p, size:0x%x\n", + image_gz_payload, image_gz_sz); CHECK: Alignment should match open parenthesis #245: FILE: kernel/bpf/helpers.c:3476: + ret = decompressor(input_buf, image_gz_sz, NULL, flush, + NULL, NULL, NULL); total: 0 errors, 7 warnings, 8 checks, 241 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 37541490db8d ("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, 241 lines checked