WARNING: line length of 89 exceeds 80 columns #134: FILE: kernel/bpf/bpf_insn_set.c:75: + insn_set->unique_offsets = kzalloc(sizeof(long) * attr->max_entries, GFP_KERNEL); WARNING: line length of 87 exceeds 80 columns #152: FILE: kernel/bpf/bpf_insn_set.c:182: +static int insn_set_map_direct_value_addr(const struct bpf_map *map, u64 *imm, u32 off) CHECK: spaces preferred around that '-' (ctx:VxV) #205: FILE: kernel/bpf/bpf_insn_set.c:269: + if (*off[i] != *off[ucnt-1]) ^ WARNING: line length of 88 exceeds 80 columns #262: FILE: kernel/bpf/verifier.c:209: +static int add_used_map(struct bpf_verifier_env *env, int fd, struct bpf_map **map_ptr); WARNING: line length of 88 exceeds 80 columns #274: FILE: kernel/bpf/verifier.c:5656: + if ((off < 0) || (off % sizeof(long)) || (off/sizeof(long) >= map->max_entries)) CHECK: spaces preferred around that '/' (ctx:VxV) #274: FILE: kernel/bpf/verifier.c:5656: + if ((off < 0) || (off % sizeof(long)) || (off/sizeof(long) >= map->max_entries)) ^ CHECK: Unnecessary parentheses around 'off < 0' #274: FILE: kernel/bpf/verifier.c:5656: + if ((off < 0) || (off % sizeof(long)) || (off/sizeof(long) >= map->max_entries)) WARNING: line length of 91 exceeds 80 columns #291: FILE: kernel/bpf/verifier.c:5684: + check_insn_set_mem_access(env, reg->map_ptr, off, size, mem_size) == 0) WARNING: line length of 93 exceeds 80 columns #320: FILE: kernel/bpf/verifier.c:7760: + if (src_reg_type == PTR_TO_MAP_VALUE && map_is_insn_set(regs[insn->src_reg].map_ptr)) WARNING: line length of 85 exceeds 80 columns #344: FILE: kernel/bpf/verifier.c:15333: + if (dst_reg->type == PTR_TO_MAP_VALUE && map_is_insn_set(dst_reg->map_ptr)) { WARNING: line length of 98 exceeds 80 columns #346: FILE: kernel/bpf/verifier.c:15335: + verbose(env, "Operation %s on ptr to instruction set map is prohibited\n", WARNING: line length of 99 exceeds 80 columns #352: FILE: kernel/bpf/verifier.c:15341: + verbose(env, "Adding non-scalar R%d to an instruction ptr is prohibited\n", ERROR: Macros with complex values should be enclosed in parentheses #379: FILE: kernel/bpf/verifier.c:17610: +#define SET_HIGH(STATE, LAST) STATE = (STATE & 0xffffU) | ((LAST) << 16) 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: line length of 82 exceeds 80 columns #384: FILE: kernel/bpf/verifier.c:17615: + /* TBD: check that to belongs to the same BPF function && whatever else */ WARNING: line length of 85 exceeds 80 columns #389: FILE: kernel/bpf/verifier.c:17620: +static int push_goto_x_edge(int t, struct bpf_verifier_env *env, struct bpf_map *map) WARNING: line length of 83 exceeds 80 columns #490: FILE: kernel/bpf/verifier.c:19786: +static int check_indirect_jump(struct bpf_verifier_env *env, struct bpf_insn *insn) WARNING: line length of 84 exceeds 80 columns #506: FILE: kernel/bpf/verifier.c:19802: + verbose(env, "BPF_JA|BPF_X R%d has type %d, expected PTR_TO_INSN\n", CHECK: Alignment should match open parenthesis #507: FILE: kernel/bpf/verifier.c:19803: + verbose(env, "BPF_JA|BPF_X R%d has type %d, expected PTR_TO_INSN\n", + insn->dst_reg, dst_reg->type); WARNING: line length of 92 exceeds 80 columns #512: FILE: kernel/bpf/verifier.c:19808: + verbose(env, "BPF_JA|BPF_X R%d was loaded from map id=%u, expected id=%u\n", CHECK: Alignment should match open parenthesis #513: FILE: kernel/bpf/verifier.c:19809: + verbose(env, "BPF_JA|BPF_X R%d was loaded from map id=%u, expected id=%u\n", + insn->dst_reg, dst_reg->map_ptr->id, map->id); WARNING: line length of 81 exceeds 80 columns #532: FILE: kernel/bpf/verifier.c:19828: + env->insn_idx = bpf_insn_set_iter_xlated_offset(map, dst_reg->min_index); WARNING: line length of 87 exceeds 80 columns #565: FILE: kernel/bpf/verifier.c:20515: +static int add_used_map(struct bpf_verifier_env *env, int fd, struct bpf_map **map_ptr) total: 1 errors, 16 warnings, 5 checks, 491 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 f65ab3c6cb2c ("bpf, x86: add support for 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.