WARNING: line length of 85 exceeds 80 columns #138: FILE: include/linux/bpf.h:1559: + struct llist_head log; /* list of in-flight stream elements in LIFO order */ WARNING: line length of 94 exceeds 80 columns #141: FILE: include/linux/bpf.h:1562: + struct llist_node *backlog_head; /* list of in-flight stream elements in FIFO order */ CHECK: Please don't use multiple blank lines #166: FILE: include/linux/bpf.h:2443: + WARNING: line length of 105 exceeds 80 columns #179: FILE: include/linux/bpf.h:3614: +int bpf_prog_stream_read(struct bpf_prog *prog, enum bpf_stream_id stream_id, void __user *buf, int len); CHECK: Macro argument 'ss' may be better as '(ss)' to avoid precedence issues #189: FILE: include/linux/bpf.h:3624: +#define bpf_stream_printk(ss, ...) bpf_stream_stage_printk(&ss, __VA_ARGS__) CHECK: Macro argument 'ss' may be better as '(ss)' to avoid precedence issues #191: FILE: include/linux/bpf.h:3626: +#define bpf_stream_stage(ss, prog, stream_id, expr) \ + ({ \ + if (!bpf_prog_stream_error_limit(prog)) { \ + bpf_stream_stage_init(&ss); \ + (expr); \ + bpf_stream_stage_commit(&ss, prog, stream_id); \ + bpf_stream_stage_free(&ss); \ + } \ + }) WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #308: new file mode 100644 WARNING: line length of 86 exceeds 80 columns #350: FILE: kernel/bpf/stream.c:38: +#define BPF_STREAM_PAGE_SZ (PAGE_SIZE - offsetofend(struct bpf_stream_page, consumed)) WARNING: line length of 83 exceeds 80 columns #410: FILE: kernel/bpf/stream.c:98: +static int bpf_stream_page_check_room(struct bpf_stream_page *stream_page, int len) WARNING: line length of 86 exceeds 80 columns #430: FILE: kernel/bpf/stream.c:118: +static struct bpf_stream_page *bpf_stream_page_from_elem(struct bpf_stream_elem *elem) WARNING: line length of 102 exceeds 80 columns #437: FILE: kernel/bpf/stream.c:125: +static struct bpf_stream_elem *bpf_stream_page_push_elem(struct bpf_stream_page *stream_page, int len) WARNING: line length of 89 exceeds 80 columns #441: FILE: kernel/bpf/stream.c:129: + stream_page->consumed += round_up(offsetof(struct bpf_stream_elem, str[len]), 8); ERROR: space required after that close brace '}' #473: FILE: kernel/bpf/stream.c:161: + const int max_len = ARRAY_SIZE((struct bpf_bprintf_buffers){}.buf); WARNING: line length of 85 exceeds 80 columns #479: FILE: kernel/bpf/stream.c:167: + * Length denotes the amount of data to be written as part of stream element, WARNING: line length of 84 exceeds 80 columns #480: FILE: kernel/bpf/stream.c:168: + * thus includes '\0' byte. We're capped by how much bpf_bprintf_buffers can WARNING: 'accomodate' may be misspelled - perhaps 'accommodate'? #481: FILE: kernel/bpf/stream.c:169: + * accomodate, therefore deny allocations that won't fit into them. ^^^^^^^^^^ WARNING: line length of 82 exceeds 80 columns #493: FILE: kernel/bpf/stream.c:181: +static int __bpf_stream_push_str(struct llist_head *log, const char *str, int len) WARNING: line length of 83 exceeds 80 columns #515: FILE: kernel/bpf/stream.c:203: + if (atomic_add_return(len, &stream->capacity) >= BPF_STREAM_MAX_CAPACITY) { WARNING: line length of 96 exceeds 80 columns #522: FILE: kernel/bpf/stream.c:210: +static void bpf_stream_release_capacity(struct bpf_stream *stream, struct bpf_stream_elem *elem) WARNING: line length of 83 exceeds 80 columns #529: FILE: kernel/bpf/stream.c:217: +static int bpf_stream_push_str(struct bpf_stream *stream, const char *str, int len) WARNING: line length of 96 exceeds 80 columns #536: FILE: kernel/bpf/stream.c:224: +static struct bpf_stream *bpf_stream_get(enum bpf_stream_id stream_id, struct bpf_prog_aux *aux) CHECK: multiple assignments should be avoided #570: FILE: kernel/bpf/stream.c:258: + stream->backlog_head = stream->backlog_tail = NULL; WARNING: void function return statements are not generally useful #596: FILE: kernel/bpf/stream.c:284: + return; +} WARNING: line length of 104 exceeds 80 columns #653: FILE: kernel/bpf/stream.c:341: +int bpf_prog_stream_read(struct bpf_prog *prog, enum bpf_stream_id stream_id, void __user *buf, int len) WARNING: line length of 119 exceeds 80 columns #669: FILE: kernel/bpf/stream.c:357: +__bpf_kfunc int bpf_stream_vprintk(int stream_id, const char *fmt__str, const void *args, u32 len__sz, void *aux__prog) WARNING: line length of 82 exceeds 80 columns #695: FILE: kernel/bpf/stream.c:383: + /* If the string was truncated, we only wrote until the size of buffer. */ WARNING: line length of 82 exceeds 80 columns #758: FILE: kernel/bpf/stream.c:446: + /* If the string was truncated, we only wrote until the size of buffer. */ CHECK: multiple assignments should be avoided #782: FILE: kernel/bpf/stream.c:470: + head = tail = list; WARNING: line length of 94 exceeds 80 columns #796: FILE: kernel/bpf/stream.c:484: + return atomic_fetch_add(1, &prog->aux->stream_error_cnt) >= BPF_PROG_STREAM_ERROR_CNT; WARNING: line length of 85 exceeds 80 columns #831: FILE: kernel/bpf/syscall.c:5955: + ret = bpf_prog_stream_read(prog, attr->prog_stream_read.stream_id, buf, len); total: 1 errors, 24 warnings, 5 checks, 741 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 71195007ac9a ("bpf: Introduce BPF standard streams") 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.