CHECK: Comparison to NULL could be written "ctx->image" #200: FILE: arch/arm64/net/bpf_jit_comp.c:2727: + for (i = 0; i < fmod_ret->nr_nodes && ctx->image != NULL; i++) { WARNING: line length of 92 exceeds 80 columns #297: FILE: arch/loongarch/net/bpf_jit.c:1560: + invoke_bpf_prog(ctx, tn->nodes[i], args_off, retval_off, run_ctx_off, true); WARNING: line length of 104 exceeds 80 columns #306: FILE: arch/loongarch/net/bpf_jit.c:1614: + const struct btf_func_model *m, struct bpf_tramp_nodes *tnodes, WARNING: line length of 82 exceeds 80 columns #330: FILE: arch/loongarch/net/bpf_jit.c:1768: + ret = invoke_bpf_prog(ctx, fentry->nodes[i], args_off, retval_off, WARNING: line length of 83 exceeds 80 columns #338: FILE: arch/loongarch/net/bpf_jit.c:1774: + branches = kcalloc(fmod_ret->nr_nodes, sizeof(u32 *), GFP_KERNEL); WARNING: line length of 102 exceeds 80 columns #355: FILE: arch/loongarch/net/bpf_jit.c:1804: + ret = invoke_bpf_prog(ctx, fexit->nodes[i], args_off, retval_off, run_ctx_off, false); WARNING: line length of 91 exceeds 80 columns #364: FILE: arch/loongarch/net/bpf_jit.c:1872: + u32 flags, struct bpf_tramp_nodes *tnodes, void *func_addr) WARNING: line length of 83 exceeds 80 columns #373: FILE: arch/loongarch/net/bpf_jit.c:1888: + ret = __arch_prepare_bpf_trampoline(&ctx, im, m, tnodes, func_addr, flags); WARNING: line length of 84 exceeds 80 columns #391: FILE: arch/loongarch/net/bpf_jit.c:1918: + ret = __arch_prepare_bpf_trampoline(&ctx, &im, m, tnodes, func_addr, flags); WARNING: line length of 82 exceeds 80 columns #404: FILE: arch/powerpc/net/bpf_jit_comp.c:620: + struct bpf_tramp_node *n, int regs_off, int retval_off, WARNING: line length of 87 exceeds 80 columns #432: FILE: arch/powerpc/net/bpf_jit_comp.c:702: + struct bpf_tramp_nodes *tn, int regs_off, int retval_off, WARNING: line length of 93 exceeds 80 columns #443: FILE: arch/powerpc/net/bpf_jit_comp.c:714: + if (invoke_bpf_prog(image, ro_image, ctx, tn->nodes[i], regs_off, retval_off, WARNING: line length of 97 exceeds 80 columns #481: FILE: arch/powerpc/net/bpf_jit_comp.c:1061: + if (invoke_bpf_prog(image, ro_image, ctx, fentry->nodes[i], regs_off, retval_off, WARNING: line length of 96 exceeds 80 columns #517: FILE: arch/powerpc/net/bpf_jit_comp.c:1141: + if (invoke_bpf_prog(image, ro_image, ctx, fexit->nodes[i], regs_off, retval_off, WARNING: line length of 96 exceeds 80 columns #532: FILE: arch/powerpc/net/bpf_jit_comp.c:1213: + ret = __arch_prepare_bpf_trampoline(&im, NULL, NULL, NULL, m, flags, tnodes, func_addr); WARNING: line length of 85 exceeds 80 columns #561: FILE: arch/riscv/net/bpf_jit_comp64.c:937: +static int invoke_bpf_prog(struct bpf_tramp_node *node, int args_off, int retval_off, WARNING: line length of 96 exceeds 80 columns #572: FILE: arch/riscv/net/bpf_jit_comp64.c:945: + emit_store_stack_imm64(RV_REG_T1, -run_ctx_off + cookie_off, node->cookie, ctx); WARNING: line length of 86 exceeds 80 columns #599: FILE: arch/riscv/net/bpf_jit_comp64.c:1014: + err = invoke_bpf_prog(tn->nodes[i], args_off, retval_off, run_ctx_off, WARNING: line length of 87 exceeds 80 columns #667: FILE: arch/riscv/net/bpf_jit_comp64.c:1205: + ret = invoke_bpf_prog(fmod_ret->nodes[i], args_off, retval_off, WARNING: line length of 84 exceeds 80 columns #707: FILE: arch/riscv/net/bpf_jit_comp64.c:1317: + ret = __arch_prepare_bpf_trampoline(&im, m, tnodes, func_addr, flags, &ctx); WARNING: line length of 83 exceeds 80 columns #725: FILE: arch/riscv/net/bpf_jit_comp64.c:1349: + ret = __arch_prepare_bpf_trampoline(im, m, tnodes, func_addr, flags, &ctx); WARNING: line length of 90 exceeds 80 columns #939: FILE: arch/x86/net/bpf_jit_comp.c:3123: + if (invoke_bpf_prog(m, &prog, tl->nodes[i], stack_size, run_ctx_off, true, CHECK: Please use a blank line after function/struct/union/enum declarations #1124: FILE: include/linux/bpf.h:1549: } +static inline int bpf_trampoline_unlink_prog(struct bpf_tramp_node *node, WARNING: line length of 94 exceeds 80 columns #1173: FILE: include/linux/bpf.h:2199: + if (fentries.nodes[i]->link->prog->expected_attach_type == BPF_TRACE_FSESSION) WARNING: line length of 92 exceeds 80 columns #1215: FILE: include/linux/bpf.h:3133: +static inline void bpf_tramp_link_init(struct bpf_tramp_link *link, enum bpf_link_type type, WARNING: line length of 93 exceeds 80 columns #1216: FILE: include/linux/bpf.h:3134: + const struct bpf_link_ops *ops, struct bpf_prog *prog, WARNING: line length of 84 exceeds 80 columns #1217: FILE: include/linux/bpf.h:3135: + enum bpf_attach_type attach_type, u64 cookie) WARNING: line length of 94 exceeds 80 columns #1292: FILE: kernel/bpf/bpf_struct_ops.c:824: + &bpf_struct_ops_link_lops, prog, prog->expected_attach_type, 0); CHECK: Alignment should match open parenthesis #1292: FILE: kernel/bpf/bpf_struct_ops.c:824: + bpf_tramp_link_init(link, BPF_LINK_TYPE_STRUCT_OPS, + &bpf_struct_ops_link_lops, prog, prog->expected_attach_type, 0); CHECK: Alignment should match open parenthesis #1303: FILE: kernel/bpf/bpf_struct_ops.c:837: + err = bpf_struct_ops_prepare_trampoline(tnodes, &link->node, &st_ops->func_models[i], WARNING: line length of 98 exceeds 80 columns #1350: FILE: kernel/bpf/syscall.c:3534: + struct bpf_tracing_link *tr_link = container_of(link, struct bpf_tracing_link, link.link); WARNING: line length of 98 exceeds 80 columns #1360: FILE: kernel/bpf/syscall.c:3542: + struct bpf_tracing_link *tr_link = container_of(link, struct bpf_tracing_link, link.link); WARNING: line length of 98 exceeds 80 columns #1378: FILE: kernel/bpf/syscall.c:3562: + struct bpf_tracing_link *tr_link = container_of(link, struct bpf_tracing_link, link.link); WARNING: line length of 82 exceeds 80 columns #1393: FILE: kernel/bpf/syscall.c:3652: + bpf_tramp_link_init(&fslink->fexit, BPF_LINK_TYPE_TRACING, WARNING: line length of 86 exceeds 80 columns #1394: FILE: kernel/bpf/syscall.c:3653: + &bpf_tracing_link_lops, prog, attach_type, WARNING: line length of 83 exceeds 80 columns #1408: FILE: kernel/bpf/syscall.c:3667: + &bpf_tracing_link_lops, prog, attach_type, bpf_cookie); WARNING: line length of 81 exceeds 80 columns #1457: FILE: kernel/bpf/trampoline.c:521: + hlist_for_each_entry(node, &tr->progs_hlist[kind], tramp_hlist) { WARNING: line length of 86 exceeds 80 columns #1566: FILE: kernel/bpf/trampoline.c:853: + fslink = container_of(node, struct bpf_fsession_link, link.link.node); WARNING: line length of 99 exceeds 80 columns #1567: FILE: kernel/bpf/trampoline.c:854: + hlist_add_head(&fslink->fexit.node.tramp_hlist, &tr->progs_hlist[BPF_TRAMP_FEXIT]); WARNING: line length of 86 exceeds 80 columns #1586: FILE: kernel/bpf/trampoline.c:870: + fslink = container_of(node, struct bpf_fsession_link, link.link.node); WARNING: line length of 84 exceeds 80 columns #1641: FILE: kernel/bpf/trampoline.c:927: + err = __bpf_trampoline_link_prog(node, tr, tgt_prog, &trampoline_ops, NULL); WARNING: line length of 86 exceeds 80 columns #1679: FILE: kernel/bpf/trampoline.c:964: + err = __bpf_trampoline_unlink_prog(node, tr, tgt_prog, &trampoline_ops, NULL); WARNING: line length of 101 exceeds 80 columns #1688: FILE: kernel/bpf/trampoline.c:979: + WARN_ON_ONCE(bpf_trampoline_unlink_prog(&shim_link->link.node, shim_link->trampoline, NULL)); CHECK: Alignment should match open parenthesis #1699: FILE: kernel/bpf/trampoline.c:1026: + bpf_tramp_link_init(&shim_link->link, BPF_LINK_TYPE_UNSPEC, + &bpf_shim_tramp_link_lops, p, attach_type, 0); WARNING: line length of 81 exceeds 80 columns #1714: FILE: kernel/bpf/trampoline.c:1039: + hlist_for_each_entry(node, &tr->progs_hlist[kind], tramp_hlist) { WARNING: line length of 97 exceeds 80 columns #1719: FILE: kernel/bpf/trampoline.c:1043: + return container_of(node, struct bpf_shim_tramp_link, link.node); WARNING: line length of 97 exceeds 80 columns #1728: FILE: kernel/bpf/trampoline.c:1093: + err = __bpf_trampoline_link_prog(&shim_link->link.node, tr, NULL, &trampoline_ops, NULL); WARNING: line length of 84 exceeds 80 columns #1746: FILE: kernel/bpf/trampoline.c:1442: + struct bpf_tramp_nodes *tnodes, void *func_addr) WARNING: line length of 86 exceeds 80 columns #1780: FILE: net/bpf/bpf_dummy_struct_ops.c:174: + bpf_tramp_link_init(link, BPF_LINK_TYPE_STRUCT_OPS, &bpf_struct_ops_link_lops, total: 0 errors, 44 warnings, 5 checks, 1569 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 fed5ebd017be ("bpf: Add struct bpf_tramp_node object") 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. total: 0 errors, 44 warnings, 5 checks, 1569 lines checked