WARNING: line length of 81 exceeds 80 columns #38: FILE: tools/testing/selftests/net/tcp_ao/connect-deny.c:81: + test_assert_counters(tst_name, &ao_cnt1, &ao_cnt2, cnt_expected); WARNING: line length of 81 exceeds 80 columns #47: FILE: tools/testing/selftests/net/tcp_ao/connect-deny.c:207: + test_assert_counters(tst_name, &ao_cnt1, &ao_cnt2, cnt_expected); WARNING: line length of 97 exceeds 80 columns #76: FILE: tools/testing/selftests/net/tcp_ao/icmps-discard.c:96: + test_assert_counters(NULL, &ao_cnt1, &ao_cnt2, TEST_CNT_GOOD | TEST_CNT_AO_DROPPED_ICMP); WARNING: line length of 81 exceeds 80 columns #101: FILE: tools/testing/selftests/net/tcp_ao/key-management.c:656: + rx_cnt_expected ? TEST_CNT_KEY_GOOD : 0, CHECK: extern prototypes should be avoided in .h files #138: FILE: tools/testing/selftests/net/tcp_ao/lib/aolib.h:558: +extern int test_assert_counters_ao(const char *tst_name, CHECK: Alignment should match open parenthesis #139: FILE: tools/testing/selftests/net/tcp_ao/lib/aolib.h:559: +extern int test_assert_counters_ao(const char *tst_name, struct tcp_ao_counters *before, struct tcp_ao_counters *after, CHECK: extern prototypes should be avoided in .h files #142: FILE: tools/testing/selftests/net/tcp_ao/lib/aolib.h:561: +extern int test_assert_counters_key(const char *tst_name, CHECK: Alignment should match open parenthesis #143: FILE: tools/testing/selftests/net/tcp_ao/lib/aolib.h:562: +extern int test_assert_counters_key(const char *tst_name, struct tcp_ao_counters *before, struct tcp_ao_counters *after, WARNING: line length of 82 exceeds 80 columns #167: FILE: tools/testing/selftests/net/tcp_ao/lib/aolib.h:581: + ret = test_assert_counters_key(tst_name, before, after, expected, -1, -1); WARNING: line length of 84 exceeds 80 columns #183: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:406: +int test_cmp_counters(struct tcp_ao_counters *before, struct tcp_ao_counters *after) CHECK: Macro argument 'cnt' may be better as '(cnt)' to avoid precedence issues #186: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:408: +#define __cmp(cnt, e_cnt) \ +do { \ + if (before->cnt > after->cnt) \ + return -1; \ + if (before->cnt != after->cnt) \ + ret |= e_cnt; \ +} while (0) WARNING: Macros with flow control statements should be avoided #186: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:408: +#define __cmp(cnt, e_cnt) \ +do { \ + if (before->cnt > after->cnt) \ + return -1; \ + if (before->cnt != after->cnt) \ + ret |= e_cnt; \ +} while (0) CHECK: Macro argument 'cnt' may be better as '(cnt)' to avoid precedence issues #216: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:438: +#define __cmp_ao(cnt, e_cnt) \ do { \ if (before->cnt > after->cnt) { \ test_fail("%s: Decreased counter " __stringify(cnt) " %" PRIu64 " > %" PRIu64, \ + tst_name ?: "", before->cnt, after->cnt); \ return -1; \ } \ + if ((before->cnt != after->cnt) != !!(expected & e_cnt)) { \ test_fail("%s: Counter " __stringify(cnt) " was %sexpected to increase %" PRIu64 " => %" PRIu64, \ + tst_name ?: "", (expected & e_cnt) ? "" : "not ", \ before->cnt, after->cnt); \ return -1; \ } \ +} while (0) CHECK: Macro argument 'e_cnt' may be better as '(e_cnt)' to avoid precedence issues #216: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:438: +#define __cmp_ao(cnt, e_cnt) \ do { \ if (before->cnt > after->cnt) { \ test_fail("%s: Decreased counter " __stringify(cnt) " %" PRIu64 " > %" PRIu64, \ + tst_name ?: "", before->cnt, after->cnt); \ return -1; \ } \ + if ((before->cnt != after->cnt) != !!(expected & e_cnt)) { \ test_fail("%s: Counter " __stringify(cnt) " was %sexpected to increase %" PRIu64 " => %" PRIu64, \ + tst_name ?: "", (expected & e_cnt) ? "" : "not ", \ before->cnt, after->cnt); \ return -1; \ } \ +} while (0) WARNING: Macros with flow control statements should be avoided #216: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:438: +#define __cmp_ao(cnt, e_cnt) \ do { \ if (before->cnt > after->cnt) { \ test_fail("%s: Decreased counter " __stringify(cnt) " %" PRIu64 " > %" PRIu64, \ + tst_name ?: "", before->cnt, after->cnt); \ return -1; \ } \ + if ((before->cnt != after->cnt) != !!(expected & e_cnt)) { \ test_fail("%s: Counter " __stringify(cnt) " was %sexpected to increase %" PRIu64 " => %" PRIu64, \ + tst_name ?: "", (expected & e_cnt) ? "" : "not ", \ before->cnt, after->cnt); \ return -1; \ } \ +} while (0) CHECK: Unnecessary parentheses around 'before->cnt != after->cnt' #225: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:445: + if ((before->cnt != after->cnt) != !!(expected & e_cnt)) { \ WARNING: line length of 81 exceeds 80 columns #228: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:447: + tst_name ?: "", (expected & e_cnt) ? "" : "not ", \ CHECK: Macro argument 'cnt' may be better as '(cnt)' to avoid precedence issues #269: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:465: +#define __cmp_ao(i, cnt, e_cnt) \ do { \ if (before->key_cnts[i].cnt > after->key_cnts[i].cnt) { \ test_fail("%s: Decreased counter " __stringify(cnt) " %" PRIu64 " > %" PRIu64 " for key %u:%u", \ WARNING: Argument 'e_cnt' is not used in function-like macro #269: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:465: +#define __cmp_ao(i, cnt, e_cnt) \ do { \ if (before->key_cnts[i].cnt > after->key_cnts[i].cnt) { \ test_fail("%s: Decreased counter " __stringify(cnt) " %" PRIu64 " > %" PRIu64 " for key %u:%u", \ WARNING: line length of 105 exceeds 80 columns #278: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:475: + if ((before->key_cnts[i].cnt != after->key_cnts[i].cnt) != !!(expected & e_cnt)) { \ CHECK: Unnecessary parentheses around 'before->key_cnts[i].cnt != after->key_cnts[i].cnt' #278: FILE: tools/testing/selftests/net/tcp_ao/lib/sock.c:475: + if ((before->key_cnts[i].cnt != after->key_cnts[i].cnt) != !!(expected & e_cnt)) { \ WARNING: line length of 83 exceeds 80 columns #335: FILE: tools/testing/selftests/net/tcp_ao/rst.c:123: + if (test_assert_counters("active RST server", &cnt1, &cnt2, TEST_CNT_GOOD)) WARNING: line length of 81 exceeds 80 columns #401: FILE: tools/testing/selftests/net/tcp_ao/unsigned-md5.c:111: + test_assert_counters(tst_name, &ao_cnt1, &ao_cnt2, cnt_expected); total: 0 errors, 13 warnings, 10 checks, 311 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 e42e96fd44d3 ("selftests/net: Provide tcp-ao counters comparison helper") 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. total: 0 errors, 13 warnings, 10 checks, 311 lines checked