WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #68: new file mode 100644 WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable #184: FILE: drivers/net/ethernet/intel/libeth/xdp.c:11: +EXPORT_SYMBOL_NS_GPL(libeth_xdpsq_share, LIBETH_XDP); CHECK: spinlock_t definition without comment #1049: FILE: include/net/libeth/types.h:79: + spinlock_t lock; ERROR: Macros with multiple statements should be enclosed in a do - while loop #1177: FILE: include/net/libeth/xdp.h:76: +#define ___LIBETH_XDP_ONSTACK_BUFF(name, ...) \ + _DEFINE_FLEX(struct libeth_xdp_buff, name, priv, \ + LIBETH_XDP_PRIV_SZ(__VA_ARGS__ + 0), \ + /* no init */); \ + LIBETH_XDP_ASSERT_PRIV_SZ(__VA_ARGS__ + 0) CHECK: Macro argument 'ue' may be better as '(ue)' to avoid precedence issues #1783: FILE: include/net/libeth/xdp.h:682: +#define __libeth_xdp_tx_fill_stats(sqe, desc, sinfo, ue, ud, us) do { \ + const struct libeth_xdp_tx_desc *ud = (desc); \ + const struct skb_shared_info *us; \ + struct libeth_sqe *ue = (sqe); \ + \ + ue->nr_frags = 1; \ + ue->bytes = ud->len; \ + \ + if (ud->flags & LIBETH_XDP_TX_MULTI) { \ + us = (sinfo); \ + ue->nr_frags += us->nr_frags; \ + ue->bytes += us->xdp_frags_size; \ + } \ +} while (0) CHECK: Macro argument 'ud' may be better as '(ud)' to avoid precedence issues #1783: FILE: include/net/libeth/xdp.h:682: +#define __libeth_xdp_tx_fill_stats(sqe, desc, sinfo, ue, ud, us) do { \ + const struct libeth_xdp_tx_desc *ud = (desc); \ + const struct skb_shared_info *us; \ + struct libeth_sqe *ue = (sqe); \ + \ + ue->nr_frags = 1; \ + ue->bytes = ud->len; \ + \ + if (ud->flags & LIBETH_XDP_TX_MULTI) { \ + us = (sinfo); \ + ue->nr_frags += us->nr_frags; \ + ue->bytes += us->xdp_frags_size; \ + } \ +} while (0) CHECK: Macro argument 'us' may be better as '(us)' to avoid precedence issues #1783: FILE: include/net/libeth/xdp.h:682: +#define __libeth_xdp_tx_fill_stats(sqe, desc, sinfo, ue, ud, us) do { \ + const struct libeth_xdp_tx_desc *ud = (desc); \ + const struct skb_shared_info *us; \ + struct libeth_sqe *ue = (sqe); \ + \ + ue->nr_frags = 1; \ + ue->bytes = ud->len; \ + \ + if (ud->flags & LIBETH_XDP_TX_MULTI) { \ + us = (sinfo); \ + ue->nr_frags += us->nr_frags; \ + ue->bytes += us->xdp_frags_size; \ + } \ +} while (0) CHECK: spaces preferred around that '*' (ctx:WxO) #1940: FILE: include/net/libeth/xdp.h:839: + const struct xdp_frame *: \ ^ ERROR: spaces required around that ':' (ctx:OxE) #1940: FILE: include/net/libeth/xdp.h:839: + const struct xdp_frame *: \ ^ CHECK: spaces preferred around that '*' (ctx:WxO) #1942: FILE: include/net/libeth/xdp.h:841: + struct xdp_frame *: \ ^ ERROR: spaces required around that ':' (ctx:OxE) #1942: FILE: include/net/libeth/xdp.h:841: + struct xdp_frame *: \ ^ ERROR: Macros with multiple statements should be enclosed in a do - while loop #2686: FILE: include/net/libeth/xdp.h:1585: +#define LIBETH_XDP_DEFINE_START() \ + __diag_push(); \ + __diag_ignore(GCC, 8, "-Wold-style-declaration", \ + "Allow specifying \'static\' after the return type") WARNING: Macros with flow control statements should be avoided #2723: FILE: include/net/libeth/xdp.h:1622: +#define LIBETH_XDP_DEFINE_FLUSH_XMIT(name, prep, xmit) \ +bool name(struct libeth_xdp_tx_bulk *bq, u32 flags) \ +{ \ + return libeth_xdp_xmit_flush_bulk(bq, flags, prep, xmit); \ +} ERROR: Macros with complex values should be enclosed in parentheses #2737: FILE: include/net/libeth/xdp.h:1636: +#define __LIBETH_XDP_DEFINE_RUN_PROG(name, flush, pfx) \ +name(struct libeth_xdp_buff *xdp, struct libeth_xdp_tx_bulk *bq) \ +{ \ + return libeth_##pfx##_run_prog(xdp, bq, flush); \ +} ERROR: Macros with complex values should be enclosed in parentheses #2752: FILE: include/net/libeth/xdp.h:1651: +#define __LIBETH_XDP_DEFINE_RUN_PASS(name, run, populate, pfx) \ +name(struct libeth_xdp_buff *xdp, struct libeth_xdp_tx_bulk *bq, \ + struct napi_struct *napi, struct libeth_rq_napi_stats *ss, \ + const void *desc) \ +{ \ + return libeth_##pfx##_run_pass(xdp, bq, napi, ss, desc, run, \ + populate); \ +} WARNING: please, no spaces at the start of a line #2754: FILE: include/net/libeth/xdp.h:1653: + struct napi_struct *napi, struct libeth_rq_napi_stats *ss,^I^I \$ WARNING: please, no spaces at the start of a line #2755: FILE: include/net/libeth/xdp.h:1654: + const void *desc)^I^I^I^I^I^I^I \$ ERROR: Macros with multiple statements should be enclosed in a do - while loop #2771: FILE: include/net/libeth/xdp.h:1670: +#define __LIBETH_XDP_DEFINE_RUN(name, run, flush, populate, pfx) \ + LIBETH_##pfx##_DEFINE_RUN_PROG(static run, flush); \ + LIBETH_##pfx##_DEFINE_RUN_PASS(name, run, populate) CHECK: Macro argument 'ud' may be better as '(ud)' to avoid precedence issues #2956: FILE: include/net/libeth/xdp.h:1855: +#define __libeth_xdp_set_features_noredir(dev, ud, ...) do { \ + struct net_device *ud = (dev); \ + \ + libeth_xdp_set_features(ud, ##__VA_ARGS__); \ + libeth_xdp_set_redirect(ud, false); \ +} while (0) CHECK: Alignment should match open parenthesis #3574: FILE: include/net/libeth/xsk.h:603: + struct_group_tagged(libeth_xskfq_fp, fp, + struct xsk_buff_pool *pool; total: 7 errors, 5 warnings, 8 checks, 3549 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 16262fcce58f ("libeth: add a couple of XDP helpers (libeth_xdp)") 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.