WARNING: Commit log lines starting with '#' are dropped by git as comments #62: # cat /sys/kernel/debug/tracing/events/tcp/tcp_retransmit_skb/format WARNING: Commit log lines starting with '#' are dropped by git as comments #76: # cat /sys/kernel/debug/tracing/events/tcp/tcp_retransmit_skb/format ERROR: Macros with complex values should be enclosed in parentheses #139: FILE: include/trace/events/tcp.h:16: +#define TCP_RETRANSMIT_QUIT_REASON \ + ENUM(TCP_RETRANS_ERR_DEFAULT, "retransmit terminate unexpectedly") \ + ENUM(TCP_RETRANS_SUCCESS, "retransmit successfully") \ + ENUM(TCP_RETRANS_IN_HOST_QUEUE, "packet still queued in driver") \ + ENUM(TCP_RETRANS_END_SEQ_ERROR, "invalid end sequence") \ + ENUM(TCP_RETRANS_TRIM_HEAD_NOMEM, "trim head no memory") \ + ENUM(TCP_RETRANS_UNCLONE_NOMEM, "skb unclone keeptruesize no memory") \ + ENUM(TCP_RETRANS_FRAG_NOMEM, "fragment no memory") \ + ENUM(TCP_RETRANS_ROUTE_FAIL, "routing failure") \ + ENUM(TCP_RETRANS_RCV_ZERO_WINDOW, "closed recevier window") \ + ENUMe(TCP_RETRANS_PSKB_COPY_NOBUFS, "no buffer for skb copy") \ + BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. WARNING: line length of 97 exceeds 80 columns #140: FILE: include/trace/events/tcp.h:17: + ENUM(TCP_RETRANS_ERR_DEFAULT, "retransmit terminate unexpectedly") \ WARNING: line length of 97 exceeds 80 columns #141: FILE: include/trace/events/tcp.h:18: + ENUM(TCP_RETRANS_SUCCESS, "retransmit successfully") \ WARNING: line length of 97 exceeds 80 columns #142: FILE: include/trace/events/tcp.h:19: + ENUM(TCP_RETRANS_IN_HOST_QUEUE, "packet still queued in driver") \ WARNING: line length of 97 exceeds 80 columns #143: FILE: include/trace/events/tcp.h:20: + ENUM(TCP_RETRANS_END_SEQ_ERROR, "invalid end sequence") \ WARNING: line length of 97 exceeds 80 columns #144: FILE: include/trace/events/tcp.h:21: + ENUM(TCP_RETRANS_TRIM_HEAD_NOMEM, "trim head no memory") \ WARNING: line length of 97 exceeds 80 columns #145: FILE: include/trace/events/tcp.h:22: + ENUM(TCP_RETRANS_UNCLONE_NOMEM, "skb unclone keeptruesize no memory") \ WARNING: line length of 97 exceeds 80 columns #146: FILE: include/trace/events/tcp.h:23: + ENUM(TCP_RETRANS_FRAG_NOMEM, "fragment no memory") \ WARNING: line length of 97 exceeds 80 columns #147: FILE: include/trace/events/tcp.h:24: + ENUM(TCP_RETRANS_ROUTE_FAIL, "routing failure") \ WARNING: line length of 97 exceeds 80 columns #148: FILE: include/trace/events/tcp.h:25: + ENUM(TCP_RETRANS_RCV_ZERO_WINDOW, "closed recevier window") \ WARNING: line length of 97 exceeds 80 columns #149: FILE: include/trace/events/tcp.h:26: + ENUMe(TCP_RETRANS_PSKB_COPY_NOBUFS, "no buffer for skb copy") \ WARNING: Argument 'b' is not used in function-like macro #154: FILE: include/trace/events/tcp.h:31: +#define ENUM(a, b) TRACE_DEFINE_ENUM(a); WARNING: macros should not use a trailing semicolon #154: FILE: include/trace/events/tcp.h:31: +#define ENUM(a, b) TRACE_DEFINE_ENUM(a); WARNING: Argument 'b' is not used in function-like macro #155: FILE: include/trace/events/tcp.h:32: +#define ENUMe(a, b) TRACE_DEFINE_ENUM(a); WARNING: macros should not use a trailing semicolon #155: FILE: include/trace/events/tcp.h:32: +#define ENUMe(a, b) TRACE_DEFINE_ENUM(a); CHECK: Alignment should match open parenthesis #166: FILE: include/trace/events/tcp.h:43: +TRACE_EVENT(tcp_retransmit_skb, CHECK: Alignment should match open parenthesis #169: FILE: include/trace/events/tcp.h:45: + TP_PROTO(const struct sock *sk, const struct sk_buff *skb, + enum tcp_retransmit_quit_reason quit_reason), WARNING: line length of 85 exceeds 80 columns #207: FILE: include/trace/events/tcp.h:93: + __print_symbolic(__entry->quit_reason, TCP_RETRANSMIT_QUIT_REASON)) WARNING: line length of 81 exceeds 80 columns #246: FILE: net/ipv4/tcp_output.c:3353: + if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) { total: 1 errors, 18 warnings, 2 checks, 203 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 cb5abd4dfbcd ("tcp: extend tcp_retransmit_skb tracepoint with failure reasons") 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.