WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #98: FILE: tools/testing/selftests/bpf/conctest.c:35: +static volatile int stop; CHECK: braces {} should be used on all arms of this statement #165: FILE: tools/testing/selftests/bpf/conctest.c:102: + if (hi == UINT64_MAX) [...] + else { [...] CHECK: Unbalanced braces around else statement #167: FILE: tools/testing/selftests/bpf/conctest.c:104: + else { WARNING: line length of 85 exceeds 80 columns #245: FILE: tools/testing/selftests/bpf/conctest.c:182: + len = max_count ? (int)(s->hist[i] * HIST_BAR_WIDTH / max_count) : 0; WARNING: line length of 96 exceeds 80 columns #254: FILE: tools/testing/selftests/bpf/conctest.c:191: + char avg_str[32], min_str[32], max_str[32], med_str[32], stddev_str[32], thresh_str[32]; WARNING: line length of 81 exceeds 80 columns #308: FILE: tools/testing/selftests/bpf/conctest.c:245: + format_ns(stddev_str, sizeof(stddev_str), estimate_stddev(&agg)); WARNING: line length of 86 exceeds 80 columns #317: FILE: tools/testing/selftests/bpf/conctest.c:254: + printf(" Count: %lu (success: %lu, failure: %lu, unexpected: %lu)\n", WARNING: line length of 89 exceeds 80 columns #325: FILE: tools/testing/selftests/bpf/conctest.c:262: + format_ns(thresh_str, sizeof(thresh_str), state.delay_thresh_ns); WARNING: line length of 84 exceeds 80 columns #326: FILE: tools/testing/selftests/bpf/conctest.c:263: + printf(" Delay threshold: %s (exceeded: %s)\n", thresh_str, WARNING: line length of 81 exceeds 80 columns #354: FILE: tools/testing/selftests/bpf/conctest.c:291: + struct conctest_cfg *cfg, CHECK: Macro argument 'cfg' may be better as '(cfg)' to avoid precedence issues #362: FILE: tools/testing/selftests/bpf/conctest.c:299: +#define for_each_conctest_cfg(cfg, arr) \ + for (struct conctest_cfg *cfg = (arr); cfg->type != CT_INVALID; cfg++) WARNING: line length of 81 exceeds 80 columns #560: FILE: tools/testing/selftests/bpf/conctest.c:497: + ctx->nmi_link_fds = malloc(nr_cpus * sizeof(*ctx->nmi_link_fds)); WARNING: line length of 84 exceeds 80 columns #564: FILE: tools/testing/selftests/bpf/conctest.c:501: + memset(ctx->nmi_link_fds, -1, nr_cpus * sizeof(*ctx->nmi_link_fds)); WARNING: line length of 82 exceeds 80 columns #565: FILE: tools/testing/selftests/bpf/conctest.c:502: + memset(ctx->nmi_pmu_fds, -1, nr_cpus * sizeof(*ctx->nmi_pmu_fds)); WARNING: line length of 82 exceeds 80 columns #569: FILE: tools/testing/selftests/bpf/conctest.c:506: + ctx->attach_links = calloc(nr_attach, sizeof(*ctx->attach_links)); WARNING: line length of 90 exceeds 80 columns #636: FILE: tools/testing/selftests/bpf/conctest.c:573: + printf("\n=== %s stdout: ===\n", bpf_program__name(prog)); WARNING: line length of 97 exceeds 80 columns #669: FILE: tools/testing/selftests/bpf/conctest.c:606: + printf("Running test '%s' on %d CPU(s) for %d seconds\n", test->name, nr_cpus, duration); WARNING: line length of 81 exceeds 80 columns #696: FILE: tools/testing/selftests/bpf/conctest.c:633: + prog = bpf_object__find_program_by_name(skel->obj, name); WARNING: line length of 82 exceeds 80 columns #698: FILE: tools/testing/selftests/bpf/conctest.c:635: + fprintf(stderr, "Program '%s' not found\n", name); WARNING: line length of 99 exceeds 80 columns #715: FILE: tools/testing/selftests/bpf/conctest.c:652: + /* Pass the test nr_cpus to rotate between objects, but use passed in nr_cpus otherwise. */ WARNING: line length of 82 exceeds 80 columns #728: FILE: tools/testing/selftests/bpf/conctest.c:665: + prog_fd = find_prog_fd(skel, cfg->task.prog_name); WARNING: line length of 96 exceeds 80 columns #731: FILE: tools/testing/selftests/bpf/conctest.c:668: + "Failed to get task prog fd for CPU %d\n", cpu); WARNING: line length of 90 exceeds 80 columns #738: FILE: tools/testing/selftests/bpf/conctest.c:675: + err = pthread_create(&ctx->threads[ctx->nr_threads], NULL, WARNING: line length of 81 exceeds 80 columns #754: FILE: tools/testing/selftests/bpf/conctest.c:691: + prog_fd = find_prog_fd(skel, cfg->nmi.prog_name); WARNING: line length of 95 exceeds 80 columns #757: FILE: tools/testing/selftests/bpf/conctest.c:694: + "Failed to get NMI prog fd for CPU %d\n", cpu); WARNING: line length of 97 exceeds 80 columns #770: FILE: tools/testing/selftests/bpf/conctest.c:707: + link_fd = bpf_link_create(prog_fd, pmu_fd, BPF_PERF_EVENT, NULL); WARNING: line length of 92 exceeds 80 columns #797: FILE: tools/testing/selftests/bpf/conctest.c:734: + link = bpf_program__attach_tracepoint(prog, cfg->attach.tp_category, WARNING: line length of 83 exceeds 80 columns #798: FILE: tools/testing/selftests/bpf/conctest.c:735: + cfg->attach.tp_name); WARNING: line length of 89 exceeds 80 columns #837: FILE: tools/testing/selftests/bpf/conctest.c:774: + fprintf(stderr, "Too many test filters (max %d)\n", MAX_FILTERS); WARNING: line length of 88 exceeds 80 columns #897: FILE: tools/testing/selftests/bpf/conctest.c:834: + fprintf(stderr, "Invalid CPU count (1-%d)\n", max_cpus); WARNING: line length of 92 exceeds 80 columns #934: FILE: tools/testing/selftests/bpf/conctest.c:871: + printf("Seed: %u, delay: %u us (max: %u us)\n", delay_seed, delay_us, delay_max_us); WARNING: line length of 86 exceeds 80 columns #1045: FILE: tools/testing/selftests/bpf/progs/conctest.c:87: +static __always_inline __u64 ctx_higher_sum(struct ctx_time *ct, enum ctx_level level) WARNING: line length of 84 exceeds 80 columns #1097: FILE: tools/testing/selftests/bpf/progs/conctest.c:139: +static __always_inline void conctest_record(int stat_id, __s64 ret, bool ctx_adjust) WARNING: Missing a blank line after declarations #1159: FILE: tools/testing/selftests/bpf/progs/conctest.c:201: + u64 delay_thresh_ns = state->delay_thresh_ns; + if (!delay_thresh_ns) WARNING: line length of 107 exceeds 80 columns #1161: FILE: tools/testing/selftests/bpf/progs/conctest.c:203: + if (delay_thresh_ns && duration_ns > delay_thresh_ns && !cmpxchg(&state->delay_print_once, 0, 1)) { WARNING: Missing a blank line after declarations #1163: FILE: tools/testing/selftests/bpf/progs/conctest.c:205: + const char *unit = duration_ns >= 1000000 ? "ms" : "ns"; + bpf_stream_printk(BPF_STDOUT, WARNING: line length of 98 exceeds 80 columns #1165: FILE: tools/testing/selftests/bpf/progs/conctest.c:207: + stat_id, duration_ns / 1000000, unit, delay_thresh_ns / 1000000, total: 0 errors, 34 warnings, 3 checks, 1202 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 d310aafe85d4 ("selftests/bpf: Introduce concurrency testing tool") 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, 34 warnings, 3 checks, 1202 lines checked