CHECK: Please use a blank line after function/struct/union/enum declarations #109: FILE: include/linux/bpf.h:1589: } +static inline int bpf_trampoline_multi_attach(struct bpf_prog *prog, u32 *ids, WARNING: line length of 82 exceeds 80 columns #110: FILE: include/linux/bpf.h:1590: + struct bpf_tracing_multi_link *link) WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #112: FILE: include/linux/bpf.h:1592: + return -ENOTSUPP; CHECK: Please use a blank line after function/struct/union/enum declarations #114: FILE: include/linux/bpf.h:1594: +} +static inline int bpf_trampoline_multi_detach(struct bpf_prog *prog, WARNING: line length of 82 exceeds 80 columns #115: FILE: include/linux/bpf.h:1595: + struct bpf_tracing_multi_link *link) WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP #117: FILE: include/linux/bpf.h:1597: + return -ENOTSUPP; WARNING: line length of 85 exceeds 80 columns #158: FILE: include/linux/bpf_verifier.h:1480: +int bpf_check_attach_btf_id_multi(struct btf *btf, struct bpf_prog *prog, u32 btf_id, WARNING: please, no spaces at the start of a line #173: FILE: kernel/bpf/trampoline.c:1451: + defined(CONFIG_HAVE_SINGLE_FTRACE_DIRECT_OPS) && \$ WARNING: please, no spaces at the start of a line #174: FILE: kernel/bpf/trampoline.c:1452: + defined(CONFIG_BPF_SYSCALL)$ WARNING: line length of 86 exceeds 80 columns #221: FILE: kernel/bpf/trampoline.c:1499: +static void ftrace_hash_add(struct ftrace_hash *hash, struct ftrace_func_entry *entry, WARNING: line length of 98 exceeds 80 columns #229: FILE: kernel/bpf/trampoline.c:1507: +static int register_fentry_multi(struct bpf_trampoline *tr, struct bpf_tramp_image *im, void *ptr) CHECK: No space is necessary after a cast #231: FILE: kernel/bpf/trampoline.c:1509: + unsigned long addr = (unsigned long) im->image; WARNING: line length of 88 exceeds 80 columns #243: FILE: kernel/bpf/trampoline.c:1521: +static int unregister_fentry_multi(struct bpf_trampoline *tr, u32 orig_flags, void *ptr) CHECK: No space is necessary after a cast #245: FILE: kernel/bpf/trampoline.c:1523: + unsigned long addr = (unsigned long) tr->cur_image->image; WARNING: line length of 101 exceeds 80 columns #257: FILE: kernel/bpf/trampoline.c:1535: +static int modify_fentry_multi(struct bpf_trampoline *tr, u32 orig_flags, struct bpf_tramp_image *im, CHECK: No space is necessary after a cast #260: FILE: kernel/bpf/trampoline.c:1538: + unsigned long addr = (unsigned long) im->image; CHECK: Macro argument 'link' may be better as '(link)' to avoid precedence issues #304: FILE: kernel/bpf/trampoline.c:1582: +#define for_each_mnode_cnt(mnode, link, cnt) \ + for (i = 0, mnode = &link->nodes[i]; i < cnt; i++, mnode = &link->nodes[i]) CHECK: Macro argument 'cnt' may be better as '(cnt)' to avoid precedence issues #304: FILE: kernel/bpf/trampoline.c:1582: +#define for_each_mnode_cnt(mnode, link, cnt) \ + for (i = 0, mnode = &link->nodes[i]; i < cnt; i++, mnode = &link->nodes[i]) WARNING: line length of 83 exceeds 80 columns #305: FILE: kernel/bpf/trampoline.c:1583: + for (i = 0, mnode = &link->nodes[i]; i < cnt; i++, mnode = &link->nodes[i]) WARNING: line length of 82 exceeds 80 columns #324: FILE: kernel/bpf/trampoline.c:1602: + err = bpf_check_attach_btf_id_multi(btf, prog, ids[i], &tgt_info); WARNING: line length of 87 exceeds 80 columns #354: FILE: kernel/bpf/trampoline.c:1632: + err = __bpf_trampoline_link_prog(&mnode->node, mnode->trampoline, NULL, WARNING: line length of 87 exceeds 80 columns #372: FILE: kernel/bpf/trampoline.c:1650: + WARN_ON_ONCE(update_ftrace_direct_del(&direct_ops, data->reg)); WARNING: line length of 91 exceeds 80 columns #403: FILE: kernel/bpf/trampoline.c:1681: +int bpf_trampoline_multi_detach(struct bpf_prog *prog, struct bpf_tracing_multi_link *link) WARNING: line length of 90 exceeds 80 columns #414: FILE: kernel/bpf/trampoline.c:1692: + WARN_ON_ONCE(__bpf_trampoline_unlink_prog(&mnode->node, mnode->trampoline, CHECK: Alignment should match open parenthesis #415: FILE: kernel/bpf/trampoline.c:1693: + WARN_ON_ONCE(__bpf_trampoline_unlink_prog(&mnode->node, mnode->trampoline, + NULL, &trampoline_multi_ops, data)); WARNING: line length of 81 exceeds 80 columns #419: FILE: kernel/bpf/trampoline.c:1697: + WARN_ON_ONCE(update_ftrace_direct_del(&direct_ops, data->unreg)); WARNING: line length of 88 exceeds 80 columns #421: FILE: kernel/bpf/trampoline.c:1699: + WARN_ON_ONCE(update_ftrace_direct_mod(&direct_ops, data->modify, true)); WARNING: Block comments use * on subsequent lines #439: FILE: kernel/bpf/trampoline.c:1717: +#endif /* CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS && + CONFIG_HAVE_SINGLE_FTRACE_DIRECT_OPS && WARNING: Block comments use a trailing */ on a separate line #440: FILE: kernel/bpf/trampoline.c:1718: + CONFIG_BPF_SYSCALL */ WARNING: line length of 85 exceeds 80 columns #453: FILE: kernel/bpf/verifier.c:19661: +int bpf_check_attach_btf_id_multi(struct btf *btf, struct bpf_prog *prog, u32 btf_id, CHECK: Alignment should match open parenthesis #466: FILE: kernel/bpf/verifier.c:19674: + if (prog->expected_attach_type == BPF_TRACE_FEXIT_MULTI || + btf_id_set_contains(&noreturn_deny, btf_id)) total: 0 errors, 22 warnings, 9 checks, 423 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 84f3f1976082 ("bpf: Add bpf_trampoline_multi_attach/detach functions") 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, 22 warnings, 9 checks, 423 lines checked