WARNING: line length of 83 exceeds 80 columns #127: FILE: tools/lib/bpf/libbpf.c:1913: +static const struct jt *bpf_object__find_jt(struct bpf_object *obj, __u64 insn_off) WARNING: line length of 83 exceeds 80 columns #138: FILE: tools/lib/bpf/libbpf.c:1924: +static int bpf_object__alloc_jt(struct bpf_object *obj, __u64 insn_off, __u64 size) CHECK: spaces preferred around that '*' (ctx:VxV) #145: FILE: tools/lib/bpf/libbpf.c:1931: + jt = calloc(1, sizeof(struct jt) + sizeof(jt->jump_target[0])*size); ^ WARNING: line length of 85 exceeds 80 columns #162: FILE: tools/lib/bpf/libbpf.c:1948: + pr_warn("jump target is too big: 0x%016llx!\n", jump_target); WARNING: line length of 81 exceeds 80 columns #183: FILE: tools/lib/bpf/libbpf.c:1969: +static int bpf_object__add_jt(struct bpf_object *obj, __u64 insn_off, __u64 size) CHECK: spaces preferred around that '*' (ctx:VxV) #208: FILE: tools/lib/bpf/libbpf.c:1994: + __u64 off = buf[2*i]; ^ CHECK: spaces preferred around that '*' (ctx:VxV) #209: FILE: tools/lib/bpf/libbpf.c:1995: + __u64 size = buf[2*i+1]; ^ CHECK: spaces preferred around that '+' (ctx:VxV) #209: FILE: tools/lib/bpf/libbpf.c:1995: + __u64 size = buf[2*i+1]; ^ WARNING: line length of 84 exceeds 80 columns #316: FILE: tools/lib/bpf/libbpf.c:6255: + return prog->subprog_offset[i] - prog->subprog_sec_offst[i]; WARNING: line length of 89 exceeds 80 columns #333: FILE: tools/lib/bpf/libbpf.c:6302: + * Set imm to proper map file descriptor. In normal case, WARNING: line length of 88 exceeds 80 columns #334: FILE: tools/lib/bpf/libbpf.c:6303: + * it is just map->fd. However, in case of a jump table, WARNING: line length of 83 exceeds 80 columns #338: FILE: tools/lib/bpf/libbpf.c:6307: + if (map_fd_is_rodata(obj, map_fd) && !IS_ERR(jt)) { WARNING: line length of 97 exceeds 80 columns #339: FILE: tools/lib/bpf/libbpf.c:6308: + ajdust_insn_off = subprog_insn_off(prog, relo->insn_idx); WARNING: line length of 84 exceeds 80 columns #340: FILE: tools/lib/bpf/libbpf.c:6309: + map_fd = create_jt_map(jt, ajdust_insn_off); WARNING: line length of 96 exceeds 80 columns #343: FILE: tools/lib/bpf/libbpf.c:6312: + prog->name, i, insn[1].imm / 8); CHECK: Alignment should match open parenthesis #343: FILE: tools/lib/bpf/libbpf.c:6312: + pr_warn("prog '%s': relo #%d: failed to create a jt map for .rodata offset %u\n", + prog->name, i, insn[1].imm / 8); WARNING: line length of 89 exceeds 80 columns #347: FILE: tools/lib/bpf/libbpf.c:6316: + /* a new map is created, so offset should be 0 */ WARNING: line length of 98 exceeds 80 columns #362: FILE: tools/lib/bpf/libbpf.c:6572: +bpf_prog__append_subprog_offsets(struct bpf_program *prog, __u32 sec_insn_off, __u32 sub_insn_off) WARNING: line length of 85 exceeds 80 columns #403: FILE: tools/lib/bpf/libbpf.c:6600: + pr_warn("prog '%s': failed to realloc prog code\n", main_prog->name); CHECK: Alignment should match open parenthesis #412: FILE: tools/lib/bpf/libbpf.c:6607: + memcpy(main_prog->insns + subprog->sub_insn_off, subprog->insns, + subprog->insns_cnt * sizeof(*insns)); CHECK: Alignment should match open parenthesis #417: FILE: tools/lib/bpf/libbpf.c:6610: + pr_debug("prog '%s': added %zu insns from sub-prog '%s'\n", + main_prog->name, subprog->insns_cnt, subprog->name); WARNING: line length of 92 exceeds 80 columns #461: FILE: tools/lib/bpf/libbpf.c:7634: + pr_debug("searching for a load instruction which populated dst_reg=r%u\n", dst_reg); CHECK: spaces preferred around that '|' (ctx:VxV) #464: FILE: tools/lib/bpf/libbpf.c:7637: + if (insn->code == (BPF_LD|BPF_DW|BPF_IMM)) ^ CHECK: spaces preferred around that '|' (ctx:VxV) #464: FILE: tools/lib/bpf/libbpf.c:7637: + if (insn->code == (BPF_LD|BPF_DW|BPF_IMM)) ^ WARNING: line length of 84 exceeds 80 columns #471: FILE: tools/lib/bpf/libbpf.c:7644: +static int bpf_object__patch_gotox(struct bpf_object *obj, struct bpf_program *prog) WARNING: line length of 92 exceeds 80 columns #633: FILE: tools/lib/bpf/linker.c:1445: + pr_warn("failed to init section '%s'\n", src_sec->sec_name); WARNING: line length of 89 exceeds 80 columns #637: FILE: tools/lib/bpf/linker.c:1449: + pr_warn("ELF sections %s are incompatible\n", src_sec->sec_name); WARNING: line length of 94 exceeds 80 columns #661: FILE: tools/lib/bpf/linker.c:2333: + } else if (strcmp(src_sec->sec_name, LLVM_JT_SIZES_REL_SEC) && WARNING: line length of 87 exceeds 80 columns #662: FILE: tools/lib/bpf/linker.c:2334: + strcmp(src_sec->sec_name, RODATA_REL_SEC)) { total: 0 errors, 20 warnings, 9 checks, 574 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 a7c1c2df91f2 ("libbpf: support llvm-generated indirect jumps") 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, 20 warnings, 9 checks, 574 lines checked