CHECK: Prefer using the BIT macro #62: FILE: include/linux/bpf_local_storage.h:71: +#define SELEM_MAP_UNLINKED (1 << 0) CHECK: Prefer using the BIT macro #63: FILE: include/linux/bpf_local_storage.h:72: +#define SELEM_STORAGE_UNLINKED (1 << 1) CHECK: Prefer using the BIT macro #65: FILE: include/linux/bpf_local_storage.h:74: +#define SELEM_TOFREE (1 << 2) WARNING: line length of 83 exceeds 80 columns #85: FILE: include/linux/bpf_local_storage.h:106: + refcount_t owner_refcnt;/* Used to pin owner when map_free is uncharging */ WARNING: line length of 82 exceeds 80 columns #122: FILE: kernel/bpf/bpf_local_storage.c:228: + bpf_obj_free_fields(smap->map.record, SDATA(selem)->data); WARNING: line length of 89 exceeds 80 columns #131: FILE: kernel/bpf/bpf_local_storage.c:262: + bool free_local_storage, bool pin_owner) WARNING: line length of 89 exceeds 80 columns #182: FILE: kernel/bpf/bpf_local_storage.c:439: + local_storage = rcu_dereference_check(selem->local_storage, bpf_rcu_lock_held()); WARNING: line length of 91 exceeds 80 columns #190: FILE: kernel/bpf/bpf_local_storage.c:447: + * Call bpf_obj_free_fields() under b->lock to make sure it is done WARNING: line length of 93 exceeds 80 columns #191: FILE: kernel/bpf/bpf_local_storage.c:448: + * exactly once for an selem. Safe to free special fields immediately WARNING: line length of 90 exceeds 80 columns #196: FILE: kernel/bpf/bpf_local_storage.c:453: + bpf_obj_free_fields(smap->map.record, SDATA(selem)->data); WARNING: line length of 88 exceeds 80 columns #204: FILE: kernel/bpf/bpf_local_storage.c:461: + * When map_free(selem1), destroy(selem1) and destroy(selem2) are racing WARNING: line length of 88 exceeds 80 columns #205: FILE: kernel/bpf/bpf_local_storage.c:462: + * and both selem belong to the same bucket, if destroy(selem2) acquired WARNING: line length of 84 exceeds 80 columns #207: FILE: kernel/bpf/bpf_local_storage.c:464: + * destroy(selem1) will be able to free the special field associated WARNING: line length of 81 exceeds 80 columns #208: FILE: kernel/bpf/bpf_local_storage.c:465: + * with selem1 as raw_res_spin_lock_irqsave() returns -ETIMEDOUT. WARNING: line length of 84 exceeds 80 columns #219: FILE: kernel/bpf/bpf_local_storage.c:476: + free_storage = hlist_is_singular_node(&selem->snode, WARNING: line length of 92 exceeds 80 columns #220: FILE: kernel/bpf/bpf_local_storage.c:477: + &local_storage->list); WARNING: line length of 93 exceeds 80 columns #222: FILE: kernel/bpf/bpf_local_storage.c:479: + * Okay to skip clearing owner_storage and storage->owner in WARNING: line length of 91 exceeds 80 columns #223: FILE: kernel/bpf/bpf_local_storage.c:480: + * destroy() since the owner is going away. No user or bpf CHECK: Lines should not end with a '(' #227: FILE: kernel/bpf/bpf_local_storage.c:484: + bpf_selem_unlink_storage_nolock_misc( WARNING: line length of 84 exceeds 80 columns #233: FILE: kernel/bpf/bpf_local_storage.c:490: + raw_res_spin_unlock_irqrestore(&local_storage->lock, flags); WARNING: line length of 100 exceeds 80 columns #240: FILE: kernel/bpf/bpf_local_storage.c:497: + atomic_or(in_map_free ? SELEM_MAP_UNLINKED : SELEM_STORAGE_UNLINKED, &selem->state); WARNING: line length of 88 exceeds 80 columns #243: FILE: kernel/bpf/bpf_local_storage.c:500: + * Normally, an selem can be unlinked under local_storage->lock and b->lock, and WARNING: line length of 89 exceeds 80 columns #244: FILE: kernel/bpf/bpf_local_storage.c:501: + * then freed after an RCU grace period. However, if destroy() and map_free() are WARNING: line length of 89 exceeds 80 columns #245: FILE: kernel/bpf/bpf_local_storage.c:502: + * racing or rqspinlock returns errors in unlikely situations (unlink != 2), free WARNING: line length of 90 exceeds 80 columns #249: FILE: kernel/bpf/bpf_local_storage.c:506: + atomic_cmpxchg(&selem->state, SELEM_UNLINKED, SELEM_TOFREE) == SELEM_UNLINKED) total: 0 errors, 21 warnings, 4 checks, 204 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 bef86f0305c1 ("bpf: Support lockless unlink when freeing map or local storage") 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, 21 warnings, 4 checks, 204 lines checked