WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #65: new file mode 100644 WARNING: macros should not use a trailing semicolon #315: FILE: drivers/net/ethernet/intel/libeth/stats.c:43: +#define ___base(s) aligned_u64 s; CHECK: struct mutex definition without comment #320: FILE: drivers/net/ethernet/intel/libeth/stats.c:48: + struct mutex lock; \ WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable #357: FILE: drivers/net/ethernet/intel/libeth/stats.c:85: +EXPORT_SYMBOL_NS_GPL(libeth_##pfx##_stats_init, LIBETH); \ WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable #371: FILE: drivers/net/ethernet/intel/libeth/stats.c:99: +EXPORT_SYMBOL_NS_GPL(libeth_##pfx##_stats_deinit, LIBETH); \ CHECK: Please use a blank line after function/struct/union/enum declarations #429: FILE: drivers/net/ethernet/intel/libeth/stats.c:157: +} +#define LIBETH_RQ_STATS_EXPORT(field) LIBETH_STATS_EXPORT(rq, rx, field) CHECK: Macro argument 'iter' may be better as '(iter)' to avoid precedence issues #454: FILE: drivers/net/ethernet/intel/libeth/stats.c:182: +#define libeth_stats_foreach_export(pfx, iter) \ + for (const struct libeth_stats_export *iter = \ + &libeth_##pfx##_stats_export[0]; \ + iter < &libeth_##pfx##_stats_export[ \ + ARRAY_SIZE(libeth_##pfx##_stats_export)]; \ + iter++) ERROR: space prohibited after that open square bracket '[' #457: FILE: drivers/net/ethernet/intel/libeth/stats.c:185: + iter < &libeth_##pfx##_stats_export[ \ CHECK: Macro argument 'f' may be better as '(f)' to avoid precedence issues #698: FILE: include/net/libeth/stats.h:23: +#define __libeth_stats_inc_one(s, f, n) do { \ + typeof(*(s)) *n = (s); \ + \ + u64_stats_update_begin(&n->syncp); \ + u64_stats_inc(&n->f); \ + u64_stats_update_end(&n->syncp); \ +} while (0) CHECK: Macro argument 'n' may be better as '(n)' to avoid precedence issues #698: FILE: include/net/libeth/stats.h:23: +#define __libeth_stats_inc_one(s, f, n) do { \ + typeof(*(s)) *n = (s); \ + \ + u64_stats_update_begin(&n->syncp); \ + u64_stats_inc(&n->f); \ + u64_stats_update_end(&n->syncp); \ +} while (0) CHECK: Macro argument 'group' may be better as '(group)' to avoid precedence issues #722: FILE: include/net/libeth/stats.h:47: +#define ___libeth_stats_add(qs, ss, group, uq, us, ur) do { \ + typeof(*(qs)) *uq = (qs); \ + u64_stats_t *ur = (typeof(ur))&uq->group; \ + typeof(*(ss)) *us = (ss); \ + \ + static_assert(sizeof(uq->group) == sizeof(*us) * 2); \ + u64_stats_update_begin(&uq->syncp); \ + \ + unrolled_count(__alignof(*uq) / sizeof(*uq->raw)) \ + for (u32 i = 0; i < sizeof(*us) / sizeof(*us->raw); i++) \ + u64_stats_add(&ur[i], us->raw[i]); \ + \ + u64_stats_update_end(&uq->syncp); \ +} while (0) CHECK: Macro argument 'uq' may be better as '(uq)' to avoid precedence issues #722: FILE: include/net/libeth/stats.h:47: +#define ___libeth_stats_add(qs, ss, group, uq, us, ur) do { \ + typeof(*(qs)) *uq = (qs); \ + u64_stats_t *ur = (typeof(ur))&uq->group; \ + typeof(*(ss)) *us = (ss); \ + \ + static_assert(sizeof(uq->group) == sizeof(*us) * 2); \ + u64_stats_update_begin(&uq->syncp); \ + \ + unrolled_count(__alignof(*uq) / sizeof(*uq->raw)) \ + for (u32 i = 0; i < sizeof(*us) / sizeof(*us->raw); i++) \ + u64_stats_add(&ur[i], us->raw[i]); \ + \ + u64_stats_update_end(&uq->syncp); \ +} while (0) CHECK: Macro argument 'us' may be better as '(us)' to avoid precedence issues #722: FILE: include/net/libeth/stats.h:47: +#define ___libeth_stats_add(qs, ss, group, uq, us, ur) do { \ + typeof(*(qs)) *uq = (qs); \ + u64_stats_t *ur = (typeof(ur))&uq->group; \ + typeof(*(ss)) *us = (ss); \ + \ + static_assert(sizeof(uq->group) == sizeof(*us) * 2); \ + u64_stats_update_begin(&uq->syncp); \ + \ + unrolled_count(__alignof(*uq) / sizeof(*uq->raw)) \ + for (u32 i = 0; i < sizeof(*us) / sizeof(*us->raw); i++) \ + u64_stats_add(&ur[i], us->raw[i]); \ + \ + u64_stats_update_end(&uq->syncp); \ +} while (0) CHECK: Macro argument 'ur' may be better as '(ur)' to avoid precedence issues #722: FILE: include/net/libeth/stats.h:47: +#define ___libeth_stats_add(qs, ss, group, uq, us, ur) do { \ + typeof(*(qs)) *uq = (qs); \ + u64_stats_t *ur = (typeof(ur))&uq->group; \ + typeof(*(ss)) *us = (ss); \ + \ + static_assert(sizeof(uq->group) == sizeof(*us) * 2); \ + u64_stats_update_begin(&uq->syncp); \ + \ + unrolled_count(__alignof(*uq) / sizeof(*uq->raw)) \ + for (u32 i = 0; i < sizeof(*us) / sizeof(*us->raw); i++) \ + u64_stats_add(&ur[i], us->raw[i]); \ + \ + u64_stats_update_end(&uq->syncp); \ +} while (0) WARNING: macros should not use a trailing semicolon #760: FILE: include/net/libeth/stats.h:85: +#define ___stack(s) u32 s; CHECK: spaces preferred around that '*' (ctx:ExV) #775: FILE: include/net/libeth/stats.h:100: + *ss) \ ^ WARNING: function definition argument 'RQ' should also have an identifier name #784: FILE: include/net/libeth/stats.h:109: +void libeth_##pfx##_stats_deinit(const struct net_device *dev, u32 qid) WARNING: function definition argument 'napi' should also have an identifier name #784: FILE: include/net/libeth/stats.h:109: +void libeth_##pfx##_stats_deinit(const struct net_device *dev, u32 qid) WARNING: function definition argument 'NAPI' should also have an identifier name #784: FILE: include/net/libeth/stats.h:109: +void libeth_##pfx##_stats_deinit(const struct net_device *dev, u32 qid) WARNING: macros should not use a trailing semicolon #895: FILE: include/net/libeth/types.h:73: +#define ___live(s) __libeth_u64_stats_t s; ERROR: Macros with complex values should be enclosed in parentheses #920: FILE: include/net/libeth/types.h:98: +#define LIBETH_DECLARE_RQ_NAPI_STATS(act) \ + act(bytes) \ + act(packets) \ + act(fragments) \ + act(csum_unnecessary) \ + act(hsplit) \ + act(hsplit_linear) \ + act(hw_gro_packets) \ + act(hw_gro_bytes) ERROR: Macros with complex values should be enclosed in parentheses #930: FILE: include/net/libeth/types.h:108: +#define LIBETH_DECLARE_RQ_FAIL_STATS(act) \ + act(alloc_fail) \ + act(dma_errs) \ + act(csum_none) \ + act(csum_bad) \ + act(hsplit_errs) \ + act(build_fail) ERROR: Macros with complex values should be enclosed in parentheses #938: FILE: include/net/libeth/types.h:116: +#define LIBETH_DECLARE_RQ_STATS(act) \ + LIBETH_DECLARE_RQ_NAPI_STATS(act) \ + LIBETH_DECLARE_RQ_FAIL_STATS(act) CHECK: Alignment should match open parenthesis #948: FILE: include/net/libeth/types.h:126: + struct_group(napi, + LIBETH_DECLARE_RQ_NAPI_STATS(___live); ERROR: Macros with complex values should be enclosed in parentheses #982: FILE: include/net/libeth/types.h:160: +#define LIBETH_DECLARE_SQ_NAPI_STATS(act) \ + act(bytes) \ + act(packets) ERROR: Macros with complex values should be enclosed in parentheses #986: FILE: include/net/libeth/types.h:164: +#define LIBETH_DECLARE_SQ_XMIT_STATS(act) \ + act(fragments) \ + act(csum_none) \ + act(needs_csum) \ + act(hw_gso_packets) \ + act(tso) \ + act(uso) \ + act(hw_gso_bytes) ERROR: Macros with complex values should be enclosed in parentheses #995: FILE: include/net/libeth/types.h:173: +#define LIBETH_DECLARE_SQ_FAIL_STATS(act) \ + act(linearized) \ + act(dma_map_errs) \ + act(drops) \ + act(busy) \ + act(stop) \ + act(wake) ERROR: Macros with complex values should be enclosed in parentheses #1003: FILE: include/net/libeth/types.h:181: +#define LIBETH_DECLARE_SQ_STATS(act) \ + LIBETH_DECLARE_SQ_NAPI_STATS(act) \ + LIBETH_DECLARE_SQ_XMIT_STATS(act) \ + LIBETH_DECLARE_SQ_FAIL_STATS(act) CHECK: Alignment should match open parenthesis #1014: FILE: include/net/libeth/types.h:192: + struct_group(napi, + LIBETH_DECLARE_SQ_NAPI_STATS(___live); CHECK: Alignment should match open parenthesis #1017: FILE: include/net/libeth/types.h:195: + struct_group(xmit, + LIBETH_DECLARE_SQ_XMIT_STATS(___live); ERROR: Macros with complex values should be enclosed in parentheses #1040: FILE: include/net/libeth/types.h:218: +#define LIBETH_DECLARE_XDPSQ_NAPI_STATS(act) \ + LIBETH_DECLARE_SQ_NAPI_STATS(act) \ + act(fragments) ERROR: Macros with complex values should be enclosed in parentheses #1044: FILE: include/net/libeth/types.h:222: +#define LIBETH_DECLARE_XDPSQ_FAIL_STATS(act) \ + act(dma_map_errs) \ + act(drops) \ + act(busy) ERROR: Macros with complex values should be enclosed in parentheses #1049: FILE: include/net/libeth/types.h:227: +#define LIBETH_DECLARE_XDPSQ_STATS(act) \ + LIBETH_DECLARE_XDPSQ_NAPI_STATS(act) \ + LIBETH_DECLARE_XDPSQ_FAIL_STATS(act) CHECK: Alignment should match open parenthesis #1059: FILE: include/net/libeth/types.h:237: + struct_group(napi, + LIBETH_DECLARE_XDPSQ_NAPI_STATS(___live); total: 11 errors, 9 warnings, 14 checks, 967 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 50b189814d05 ("libeth: add common queue stats") 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.