========== checkpatch - FAILED WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #45: new file mode 100644 WARNING: Improper SPDX comment style for 'tools/testing/selftests/bpf/bpf_arena_qspinlock.h', please use '/*' instead #50: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #50: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:1: +// SPDX-License-Identifier: GPL-2.0 CHECK: spaces preferred around that '*' (ctx:WxV) #67: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:18: + struct arena_mcs_spinlock __arena *next; ^ CHECK: Prefer using the BIT macro #111: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:62: +#define _Q_LOCKED_VAL (1U << _Q_LOCKED_OFFSET) CHECK: Prefer using the BIT macro #112: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:63: +#define _Q_PENDING_VAL (1U << _Q_PENDING_OFFSET) WARNING: Prefer __pure over __attribute__((pure)) #114: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:65: +#define __pure __attribute__((pure)) WARNING: line length of 86 exceeds 80 columns #131: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:82: +decode_tail(u32 tail, struct arena_qnode (__arena *qnodes)[_Q_MAX_CPUS][_Q_MAX_NODES]) WARNING: line length of 98 exceeds 80 columns #141: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:92: +struct arena_mcs_spinlock __arena *grab_mcs_node(struct arena_mcs_spinlock __arena *base, int idx) WARNING: line length of 84 exceeds 80 columns #195: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:146: +static __always_inline void clear_pending_set_locked(struct qspinlock __arena *lock) WARNING: line length of 83 exceeds 80 columns #237: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:188: + return likely(atomic_try_cmpxchg_acquire(&lock->val, &val, _Q_LOCKED_VAL)); WARNING: Missing a blank line after declarations #288: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:239: + int cnt = _Q_PENDING_LOOPS; + val = atomic_cond_read_relaxed(&lock->val, WARNING: line length of 82 exceeds 80 columns #289: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:240: + (VAL != _Q_PENDING_VAL) || !cnt--); CHECK: Blank lines aren't necessary after an open brace '{' #313: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:264: + if (unlikely(val & ~_Q_LOCKED_MASK)) { + CHECK: Unnecessary parentheses around qnodes[bpf_get_smp_processor_id()] #348: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:299: + node0 = &(qnodes[bpf_get_smp_processor_id()])[0].mcs; WARNING: line length of 84 exceeds 80 columns #437: FILE: tools/testing/selftests/bpf/bpf_arena_qspinlock.h:388: + val = atomic_cond_read_acquire(&lock->val, !(VAL & _Q_LOCKED_PENDING_MASK)); WARNING: Improper SPDX comment style for 'tools/testing/selftests/bpf/bpf_atomic.h', please use '/*' instead #497: FILE: tools/testing/selftests/bpf/bpf_atomic.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #497: FILE: tools/testing/selftests/bpf/bpf_atomic.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #507: FILE: tools/testing/selftests/bpf/bpf_atomic.h:11: + unsigned type : (unsigned type)0, signed type : (signed type)0 WARNING: Prefer 'signed int' to bare use of 'signed' #507: FILE: tools/testing/selftests/bpf/bpf_atomic.h:11: + unsigned type : (unsigned type)0, signed type : (signed type)0 ERROR: spaces required around that ':' (ctx:VxW) #511: FILE: tools/testing/selftests/bpf/bpf_atomic.h:15: + char: (char)0, \ ^ WARNING: labels should not be indented #511: FILE: tools/testing/selftests/bpf/bpf_atomic.h:15: + char: (char)0, \ ERROR: spaces required around that ':' (ctx:VxW) #517: FILE: tools/testing/selftests/bpf/bpf_atomic.h:21: + default: (void *)0)) ^ ERROR: trailing statements should be on next line #517: FILE: tools/testing/selftests/bpf/bpf_atomic.h:21: + default: (void *)0)) WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #521: FILE: tools/testing/selftests/bpf/bpf_atomic.h:25: +#define READ_ONCE(x) (*(volatile typeof(x) *)&(x)) WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #523: FILE: tools/testing/selftests/bpf/bpf_atomic.h:27: +#define WRITE_ONCE(x, val) ((*(volatile typeof(x) *)&(x)) = (val)) WARNING: memory barrier without comment #538: FILE: tools/testing/selftests/bpf/bpf_atomic.h:42: +#define smp_mb() \ WARNING: memory barrier without comment #544: FILE: tools/testing/selftests/bpf/bpf_atomic.h:48: +#define smp_rmb() \ WARNING: memory barrier without comment #547: FILE: tools/testing/selftests/bpf/bpf_atomic.h:51: + smp_mb(); \ WARNING: memory barrier without comment #552: FILE: tools/testing/selftests/bpf/bpf_atomic.h:56: +#define smp_wmb() \ WARNING: memory barrier without comment #555: FILE: tools/testing/selftests/bpf/bpf_atomic.h:59: + smp_mb(); \ WARNING: memory barrier without comment #563: FILE: tools/testing/selftests/bpf/bpf_atomic.h:67: +#define smp_load_acquire(p) \ WARNING: memory barrier without comment #567: FILE: tools/testing/selftests/bpf/bpf_atomic.h:71: + smp_mb(); \ WARNING: memory barrier without comment #572: FILE: tools/testing/selftests/bpf/bpf_atomic.h:76: +#define smp_store_release(p, val) \ WARNING: memory barrier without comment #575: FILE: tools/testing/selftests/bpf/bpf_atomic.h:79: + smp_mb(); \ CHECK: Macro argument 'p' may be better as '(p)' to avoid precedence issues #594: FILE: tools/testing/selftests/bpf/bpf_atomic.h:98: +#define smp_cond_load_acquire(p, cond_expr) \ + ({ \ + __unqual_typeof(*p) \ + __val = smp_cond_load_relaxed(p, cond_expr); \ + smp_acquire__after_ctrl_dep(); \ + (typeof(*(p)))__val; \ + }) WARNING: memory barrier without comment #617: FILE: tools/testing/selftests/bpf/bpf_atomic.h:121: +#define arch_mcs_spin_unlock_contended(l) smp_store_release((l), 1) total: 3 errors, 28 warnings, 6 checks, 562 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 35c0ef62bfb1 ("selftests/bpf: Introduce qspinlock for BPF arena") 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.