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 #1051: FILE: include/net/libeth/types.h:79: + spinlock_t lock; ERROR: Macros with multiple statements should be enclosed in a do - while loop #1179: 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 #1782: FILE: include/net/libeth/xdp.h:679: +#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 #1782: FILE: include/net/libeth/xdp.h:679: +#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 #1782: FILE: include/net/libeth/xdp.h:679: +#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) #1939: FILE: include/net/libeth/xdp.h:836: + const struct xdp_frame *: \ ^ ERROR: spaces required around that ':' (ctx:OxE) #1939: FILE: include/net/libeth/xdp.h:836: + const struct xdp_frame *: \ ^ CHECK: spaces preferred around that '*' (ctx:WxO) #1941: FILE: include/net/libeth/xdp.h:838: + struct xdp_frame *: \ ^ ERROR: spaces required around that ':' (ctx:OxE) #1941: FILE: include/net/libeth/xdp.h:838: + struct xdp_frame *: \ ^ ERROR: Macros with multiple statements should be enclosed in a do - while loop #2685: FILE: include/net/libeth/xdp.h:1582: +#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 #2722: FILE: include/net/libeth/xdp.h:1619: +#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 #2736: FILE: include/net/libeth/xdp.h:1633: +#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 #2751: FILE: include/net/libeth/xdp.h:1648: +#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 #2753: FILE: include/net/libeth/xdp.h:1650: + struct napi_struct *napi, struct libeth_rq_napi_stats *ss,^I^I \$ WARNING: please, no spaces at the start of a line #2754: FILE: include/net/libeth/xdp.h:1651: + const void *desc)^I^I^I^I^I^I^I \$ ERROR: Macros with multiple statements should be enclosed in a do - while loop #2770: FILE: include/net/libeth/xdp.h:1667: +#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 #2955: FILE: include/net/libeth/xdp.h:1852: +#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 #3573: 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, 3548 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 5bde9764d460 ("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.