WARNING: line length of 92 exceeds 80 columns #98: FILE: tools/lib/bpf/libbpf.c:9570: +static int attach_kloc(const struct bpf_program *prog, long cookie, struct bpf_link **link); WARNING: line length of 84 exceeds 80 columns #115: FILE: tools/lib/bpf/libbpf.c:11166: + attr.config1 = name ? ptr_to_u64(name) : 0; /* kprobe_func or uprobe_path */ CHECK: Alignment should match open parenthesis #124: FILE: tools/lib/bpf/libbpf.c:12613: +struct bpf_link *bpf_program__attach_kloc(const struct bpf_program *prog, + const char *module, const char *name, WARNING: line length of 85 exceeds 80 columns #155: FILE: tools/lib/bpf/libbpf.c:12644: + link = loc_manager_attach_kloc(obj->loc_man, prog, module, name, loc_cookie); WARNING: line length of 91 exceeds 80 columns #162: FILE: tools/lib/bpf/libbpf.c:12651: +static int attach_kloc(const struct bpf_program *prog, long cookie, struct bpf_link **link) CHECK: Please use a blank line after function/struct/union/enum declarations #207: FILE: tools/lib/bpf/libbpf.h:809: +}; +#define bpf_kloc_opts__last_field loc_cookie WARNING: line length of 83 exceeds 80 columns #252: FILE: tools/lib/bpf/libbpf_internal.h:726: + const char *loc_mod, const char *loc_name, WARNING: line length of 81 exceeds 80 columns #362: FILE: tools/lib/bpf/loc.bpf.h:99: + spec_id_ptr = bpf_map_lookup_elem(&__bpf_loc_ip_to_spec_id, &ip); WARNING: line length of 96 exceeds 80 columns #464: FILE: tools/lib/bpf/loc.bpf.h:201: + err = bpf_probe_read_kernel(&val, sizeof(val), (void *)ctx + arg_spec->reg_off); WARNING: line length of 96 exceeds 80 columns #475: FILE: tools/lib/bpf/loc.bpf.h:212: + err = bpf_probe_read_kernel(&val, sizeof(val), (void *)ctx + arg_spec->reg_off); WARNING: line length of 96 exceeds 80 columns #478: FILE: tools/lib/bpf/loc.bpf.h:215: + err = bpf_probe_read_kernel(&val, sizeof(val), (void *)val + arg_spec->val_off); WARNING: line length of 89 exceeds 80 columns #525: FILE: tools/lib/bpf/loc.bpf.h:262: +/* we rely on ___bpf_apply() and ___bpf_narg() macros already defined in bpf_tracing.h */ WARNING: line length of 92 exceeds 80 columns #527: FILE: tools/lib/bpf/loc.bpf.h:264: +#define ___bpf_loc_args1(x) ___bpf_loc_args0(), ({ long _x; bpf_loc_arg(ctx, 0, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #527: FILE: tools/lib/bpf/loc.bpf.h:264: +#define ___bpf_loc_args1(x) ___bpf_loc_args0(), ({ long _x; bpf_loc_arg(ctx, 0, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #527: FILE: tools/lib/bpf/loc.bpf.h:264: +#define ___bpf_loc_args1(x) ___bpf_loc_args0(), ({ long _x; bpf_loc_arg(ctx, 0, &_x); _x; }) WARNING: line length of 105 exceeds 80 columns #528: FILE: tools/lib/bpf/loc.bpf.h:265: +#define ___bpf_loc_args2(x, args...) ___bpf_loc_args1(args), ({ long _x; bpf_loc_arg(ctx, 1, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #528: FILE: tools/lib/bpf/loc.bpf.h:265: +#define ___bpf_loc_args2(x, args...) ___bpf_loc_args1(args), ({ long _x; bpf_loc_arg(ctx, 1, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #528: FILE: tools/lib/bpf/loc.bpf.h:265: +#define ___bpf_loc_args2(x, args...) ___bpf_loc_args1(args), ({ long _x; bpf_loc_arg(ctx, 1, &_x); _x; }) WARNING: line length of 105 exceeds 80 columns #529: FILE: tools/lib/bpf/loc.bpf.h:266: +#define ___bpf_loc_args3(x, args...) ___bpf_loc_args2(args), ({ long _x; bpf_loc_arg(ctx, 2, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #529: FILE: tools/lib/bpf/loc.bpf.h:266: +#define ___bpf_loc_args3(x, args...) ___bpf_loc_args2(args), ({ long _x; bpf_loc_arg(ctx, 2, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #529: FILE: tools/lib/bpf/loc.bpf.h:266: +#define ___bpf_loc_args3(x, args...) ___bpf_loc_args2(args), ({ long _x; bpf_loc_arg(ctx, 2, &_x); _x; }) WARNING: line length of 105 exceeds 80 columns #530: FILE: tools/lib/bpf/loc.bpf.h:267: +#define ___bpf_loc_args4(x, args...) ___bpf_loc_args3(args), ({ long _x; bpf_loc_arg(ctx, 3, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #530: FILE: tools/lib/bpf/loc.bpf.h:267: +#define ___bpf_loc_args4(x, args...) ___bpf_loc_args3(args), ({ long _x; bpf_loc_arg(ctx, 3, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #530: FILE: tools/lib/bpf/loc.bpf.h:267: +#define ___bpf_loc_args4(x, args...) ___bpf_loc_args3(args), ({ long _x; bpf_loc_arg(ctx, 3, &_x); _x; }) WARNING: line length of 105 exceeds 80 columns #531: FILE: tools/lib/bpf/loc.bpf.h:268: +#define ___bpf_loc_args5(x, args...) ___bpf_loc_args4(args), ({ long _x; bpf_loc_arg(ctx, 4, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #531: FILE: tools/lib/bpf/loc.bpf.h:268: +#define ___bpf_loc_args5(x, args...) ___bpf_loc_args4(args), ({ long _x; bpf_loc_arg(ctx, 4, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #531: FILE: tools/lib/bpf/loc.bpf.h:268: +#define ___bpf_loc_args5(x, args...) ___bpf_loc_args4(args), ({ long _x; bpf_loc_arg(ctx, 4, &_x); _x; }) WARNING: line length of 105 exceeds 80 columns #532: FILE: tools/lib/bpf/loc.bpf.h:269: +#define ___bpf_loc_args6(x, args...) ___bpf_loc_args5(args), ({ long _x; bpf_loc_arg(ctx, 5, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #532: FILE: tools/lib/bpf/loc.bpf.h:269: +#define ___bpf_loc_args6(x, args...) ___bpf_loc_args5(args), ({ long _x; bpf_loc_arg(ctx, 5, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #532: FILE: tools/lib/bpf/loc.bpf.h:269: +#define ___bpf_loc_args6(x, args...) ___bpf_loc_args5(args), ({ long _x; bpf_loc_arg(ctx, 5, &_x); _x; }) WARNING: line length of 105 exceeds 80 columns #533: FILE: tools/lib/bpf/loc.bpf.h:270: +#define ___bpf_loc_args7(x, args...) ___bpf_loc_args6(args), ({ long _x; bpf_loc_arg(ctx, 6, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #533: FILE: tools/lib/bpf/loc.bpf.h:270: +#define ___bpf_loc_args7(x, args...) ___bpf_loc_args6(args), ({ long _x; bpf_loc_arg(ctx, 6, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #533: FILE: tools/lib/bpf/loc.bpf.h:270: +#define ___bpf_loc_args7(x, args...) ___bpf_loc_args6(args), ({ long _x; bpf_loc_arg(ctx, 6, &_x); _x; }) WARNING: line length of 105 exceeds 80 columns #534: FILE: tools/lib/bpf/loc.bpf.h:271: +#define ___bpf_loc_args8(x, args...) ___bpf_loc_args7(args), ({ long _x; bpf_loc_arg(ctx, 7, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #534: FILE: tools/lib/bpf/loc.bpf.h:271: +#define ___bpf_loc_args8(x, args...) ___bpf_loc_args7(args), ({ long _x; bpf_loc_arg(ctx, 7, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #534: FILE: tools/lib/bpf/loc.bpf.h:271: +#define ___bpf_loc_args8(x, args...) ___bpf_loc_args7(args), ({ long _x; bpf_loc_arg(ctx, 7, &_x); _x; }) WARNING: line length of 105 exceeds 80 columns #535: FILE: tools/lib/bpf/loc.bpf.h:272: +#define ___bpf_loc_args9(x, args...) ___bpf_loc_args8(args), ({ long _x; bpf_loc_arg(ctx, 8, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #535: FILE: tools/lib/bpf/loc.bpf.h:272: +#define ___bpf_loc_args9(x, args...) ___bpf_loc_args8(args), ({ long _x; bpf_loc_arg(ctx, 8, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #535: FILE: tools/lib/bpf/loc.bpf.h:272: +#define ___bpf_loc_args9(x, args...) ___bpf_loc_args8(args), ({ long _x; bpf_loc_arg(ctx, 8, &_x); _x; }) WARNING: line length of 106 exceeds 80 columns #536: FILE: tools/lib/bpf/loc.bpf.h:273: +#define ___bpf_loc_args10(x, args...) ___bpf_loc_args9(args), ({ long _x; bpf_loc_arg(ctx, 9, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #536: FILE: tools/lib/bpf/loc.bpf.h:273: +#define ___bpf_loc_args10(x, args...) ___bpf_loc_args9(args), ({ long _x; bpf_loc_arg(ctx, 9, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #536: FILE: tools/lib/bpf/loc.bpf.h:273: +#define ___bpf_loc_args10(x, args...) ___bpf_loc_args9(args), ({ long _x; bpf_loc_arg(ctx, 9, &_x); _x; }) WARNING: line length of 108 exceeds 80 columns #537: FILE: tools/lib/bpf/loc.bpf.h:274: +#define ___bpf_loc_args11(x, args...) ___bpf_loc_args10(args), ({ long _x; bpf_loc_arg(ctx, 10, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #537: FILE: tools/lib/bpf/loc.bpf.h:274: +#define ___bpf_loc_args11(x, args...) ___bpf_loc_args10(args), ({ long _x; bpf_loc_arg(ctx, 10, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #537: FILE: tools/lib/bpf/loc.bpf.h:274: +#define ___bpf_loc_args11(x, args...) ___bpf_loc_args10(args), ({ long _x; bpf_loc_arg(ctx, 10, &_x); _x; }) WARNING: line length of 108 exceeds 80 columns #538: FILE: tools/lib/bpf/loc.bpf.h:275: +#define ___bpf_loc_args12(x, args...) ___bpf_loc_args11(args), ({ long _x; bpf_loc_arg(ctx, 11, &_x); _x; }) ERROR: Macros with complex values should be enclosed in parentheses #538: FILE: tools/lib/bpf/loc.bpf.h:275: +#define ___bpf_loc_args12(x, args...) ___bpf_loc_args11(args), ({ long _x; bpf_loc_arg(ctx, 11, &_x); _x; }) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Argument 'x' is not used in function-like macro #538: FILE: tools/lib/bpf/loc.bpf.h:275: +#define ___bpf_loc_args12(x, args...) ___bpf_loc_args11(args), ({ long _x; bpf_loc_arg(ctx, 11, &_x); _x; }) WARNING: line length of 87 exceeds 80 columns #539: FILE: tools/lib/bpf/loc.bpf.h:276: +#define ___bpf_loc_args(args...) ___bpf_apply(___bpf_loc_args, ___bpf_narg(args))(args) WARNING: Non-declarative macros with multiple statements should be enclosed in a do - while loop #546: FILE: tools/lib/bpf/loc.bpf.h:283: +#define BPF_KLOC(name, args...) \ +name(struct pt_regs *ctx); \ +static __always_inline typeof(name(0)) \ +____##name(struct pt_regs *ctx, ##args); \ +typeof(name(0)) name(struct pt_regs *ctx) \ +{ \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wint-conversion\"") \ + return ____##name(___bpf_loc_args(args)); \ + _Pragma("GCC diagnostic pop") \ +} \ +static __always_inline typeof(name(0)) \ +____##name(struct pt_regs *ctx, ##args) BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: Macros with flow control statements should be avoided #546: FILE: tools/lib/bpf/loc.bpf.h:283: +#define BPF_KLOC(name, args...) \ +name(struct pt_regs *ctx); \ +static __always_inline typeof(name(0)) \ +____##name(struct pt_regs *ctx, ##args); \ +typeof(name(0)) name(struct pt_regs *ctx) \ +{ \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wint-conversion\"") \ + return ____##name(___bpf_loc_args(args)); \ + _Pragma("GCC diagnostic pop") \ +} \ +static __always_inline typeof(name(0)) \ +____##name(struct pt_regs *ctx, ##args) WARNING: line length of 82 exceeds 80 columns #664: FILE: tools/lib/bpf/loc.c:98: + pr_warn("loc: cannot open '%s' (err %s)\n", file, errstr(-errno)); WARNING: line length of 85 exceeds 80 columns #668: FILE: tools/lib/bpf/loc.c:102: + while (fscanf(f, "%lx %c %499s%*[^\n]\n", &addr, &type, name) == 3) { WARNING: line length of 83 exceeds 80 columns #676: FILE: tools/lib/bpf/loc.c:110: + while (fscanf(f, "%s %*s %*s %*s %*s 0x%lx\n", name, &addr) == 5) { WARNING: line length of 89 exceeds 80 columns #705: FILE: tools/lib/bpf/loc.c:139: + ip_to_spec_id_map = bpf_object__find_map_by_name(obj, "__bpf_loc_ip_to_spec_id"); WARNING: line length of 108 exceeds 80 columns #719: FILE: tools/lib/bpf/loc.c:153: + * Added in: 7adfc6c9b315 ("bpf: Add bpf_get_attach_cookie() BPF helper to access bpf_cookie value") WARNING: line length of 86 exceeds 80 columns #743: FILE: tools/lib/bpf/loc.c:177: + struct bpf_link_loc *loc_link = container_of(link, struct bpf_link_loc, link); WARNING: line length of 86 exceeds 80 columns #758: FILE: tools/lib/bpf/loc.c:192: + (void)bpf_map_delete_elem(bpf_map__fd(man->ip_to_spec_id_map), WARNING: line length of 85 exceeds 80 columns #788: FILE: tools/lib/bpf/loc.c:222: + memcpy(new_free_ids + man->free_spec_cnt, loc_link->spec_ids, WARNING: line length of 81 exceeds 80 columns #789: FILE: tools/lib/bpf/loc.c:223: + loc_link->spec_cnt * sizeof(*loc_link->spec_ids)); WARNING: line length of 86 exceeds 80 columns #800: FILE: tools/lib/bpf/loc.c:234: + struct bpf_link_loc *loc_link = container_of(link, struct bpf_link_loc, link); WARNING: line length of 82 exceeds 80 columns #808: FILE: tools/lib/bpf/loc.c:242: + struct loc_target *target, int *spec_id, bool *is_new) WARNING: line length of 99 exceeds 80 columns #812: FILE: tools/lib/bpf/loc.c:246: + new_ids = libbpf_reallocarray(link->spec_ids, link->spec_cnt + 1, sizeof(*link->spec_ids)); WARNING: line length of 81 exceeds 80 columns #817: FILE: tools/lib/bpf/loc.c:251: + /* get next free spec ID, giving preference to free list, if not empty */ WARNING: line length of 83 exceeds 80 columns #823: FILE: tools/lib/bpf/loc.c:257: + if (man->next_free_spec_id >= bpf_map__max_entries(man->specs_map)) WARNING: line length of 91 exceeds 80 columns #830: FILE: tools/lib/bpf/loc.c:264: + /* remember new spec ID in the link for later return back to free list on detach */ WARNING: line length of 90 exceeds 80 columns #837: FILE: tools/lib/bpf/loc.c:271: +static int collect_loc_targets(struct loc_manager *man, const char *mod, const char *name, WARNING: line length of 81 exceeds 80 columns #838: FILE: tools/lib/bpf/loc.c:272: + __u64 loc_cookie, struct loc_target **out_targets, WARNING: line length of 97 exceeds 80 columns #841: FILE: tools/lib/bpf/loc.c:275: +struct bpf_link *loc_manager_attach_kloc(struct loc_manager *man, const struct bpf_program *prog, WARNING: line length of 83 exceeds 80 columns #842: FILE: tools/lib/bpf/loc.c:276: + const char *loc_mod, const char *loc_name, WARNING: line length of 93 exceeds 80 columns #856: FILE: tools/lib/bpf/loc.c:290: + err = collect_loc_targets(man, loc_mod, loc_name, loc_cookie, &targets, &target_cnt); WARNING: line length of 99 exceeds 80 columns #890: FILE: tools/lib/bpf/loc.c:324: + if (is_new && bpf_map_update_elem(spec_map_fd, &spec_id, &target->spec, BPF_ANY)) { WARNING: line length of 93 exceeds 80 columns #897: FILE: tools/lib/bpf/loc.c:331: + bpf_map_update_elem(ip_map_fd, &target->abs_ip, &spec_id, BPF_NOEXIST)) { WARNING: line length of 83 exceeds 80 columns #904: FILE: tools/lib/bpf/loc.c:338: + target->abs_ip, spec_id, loc_mod, loc_name, CHECK: Please don't use multiple blank lines #910: FILE: tools/lib/bpf/loc.c:344: + + WARNING: line length of 81 exceeds 80 columns #913: FILE: tools/lib/bpf/loc.c:347: + kprobe_link = bpf_program__attach_kprobe_opts(prog, NULL, &opts); CHECK: architecture specific defines should be avoided #941: FILE: tools/lib/bpf/loc.c:375: +#if defined(__x86_64__) || defined(__i386__) WARNING: Argument 'reg32' is not used in function-like macro #947: FILE: tools/lib/bpf/loc.c:381: +#define reg_off(reg64, reg32) offsetof(struct pt_regs, reg64) WARNING: Argument 'reg64' is not used in function-like macro #949: FILE: tools/lib/bpf/loc.c:383: +#define reg_off(reg64, reg32) offsetof(struct pt_regs, reg32) ERROR: trailing whitespace #967: FILE: tools/lib/bpf/loc.c:401: +^I^I-ENOENT,^I$ WARNING: line length of 108 exceeds 80 columns #1014: FILE: tools/lib/bpf/loc.c:448: +static int parse_loc_arg(const struct btf_type *t, __u64 base_addr, short arg_num, struct loc_arg_spec *arg) WARNING: line length of 83 exceeds 80 columns #1085: FILE: tools/lib/bpf/loc.c:519: + pr_warn("loc: unknown func proto %u for '%s'\n", func_proto, name); WARNING: line length of 82 exceeds 80 columns #1098: FILE: tools/lib/bpf/loc.c:532: + pr_warn("loc: unknown loc proto %u for '%s'\n", func_proto, name); WARNING: line length of 90 exceeds 80 columns #1148: FILE: tools/lib/bpf/loc.c:582: +static int collect_loc_targets(struct loc_manager *man, const char *mod, const char *name, WARNING: line length of 81 exceeds 80 columns #1149: FILE: tools/lib/bpf/loc.c:583: + __u64 loc_cookie, struct loc_target **out_targets, WARNING: line length of 93 exceeds 80 columns #1195: FILE: tools/lib/bpf/loc.c:629: + tmp = libbpf_reallocarray(targets, target_cnt + 1, sizeof(*targets)); WARNING: line length of 84 exceeds 80 columns #1205: FILE: tools/lib/bpf/loc.c:639: + l->func_proto, l->loc_proto, l->offset, CHECK: Blank lines aren't necessary before a close brace '}' #1211: FILE: tools/lib/bpf/loc.c:645: + + } total: 13 errors, 70 warnings, 5 checks, 1138 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 1cc2b0d58825 ("libbpf: add support for BTF location attachment") 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.