WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #288: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:1: +#pragma once WARNING: Macros with flow control statements should be avoided #295: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:8: +#define can_loop \ + ({ __label__ l_break, l_continue; \ + bool ret = true; \ + asm volatile goto("may_goto %l[l_break]" \ + :::: l_break); \ + goto l_continue; \ + l_break: ret = false; \ + l_continue:; \ + ret; \ + }) WARNING: labels should not be indented #301: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:14: + l_break: ret = false; \ WARNING: labels should not be indented #302: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:15: + l_continue:; \ WARNING: Macros with flow control statements should be avoided #306: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:19: +#define __cond_break(expr) \ + ({ __label__ l_break, l_continue; \ + asm volatile goto("may_goto %l[l_break]" \ + :::: l_break); \ + goto l_continue; \ + l_break: expr; \ + l_continue:; \ + }) WARNING: labels should not be indented #311: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:24: + l_break: expr; \ WARNING: labels should not be indented #312: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:25: + l_continue:; \ WARNING: Macros with flow control statements should be avoided #316: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:29: +#define can_loop \ + ({ __label__ l_break, l_continue; \ + bool ret = true; \ + asm volatile goto("1:.byte 0xe5; \ WARNING: Avoid line continuations in quoted strings #319: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:32: + asm volatile goto("1:.byte 0xe5; \ WARNING: Avoid unnecessary line continuations #322: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:35: + .short 0" \ WARNING: Avoid line continuations in quoted strings #322: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:35: + .short 0" \ WARNING: labels should not be indented #325: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:38: + l_break: ret = false; \ WARNING: labels should not be indented #326: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:39: + l_continue:; \ WARNING: Argument 'expr' is not used in function-like macro #330: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:43: +#define __cond_break(expr) \ + ({ __label__ l_break, l_continue; \ + asm volatile goto("1:.byte 0xe5; \ WARNING: Macros with flow control statements should be avoided #330: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:43: +#define __cond_break(expr) \ + ({ __label__ l_break, l_continue; \ + asm volatile goto("1:.byte 0xe5; \ WARNING: Avoid line continuations in quoted strings #332: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:45: + asm volatile goto("1:.byte 0xe5; \ WARNING: Avoid unnecessary line continuations #335: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:48: + .short 0" \ WARNING: Avoid line continuations in quoted strings #335: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:48: + .short 0" \ WARNING: labels should not be indented #338: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:51: + l_break: expr; \ WARNING: labels should not be indented #339: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:52: + l_continue:; \ WARNING: Macros with flow control statements should be avoided #342: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:55: +#define can_loop \ + ({ __label__ l_break, l_continue; \ + bool ret = true; \ + asm volatile goto("1:.byte 0xe5; \ WARNING: Avoid line continuations in quoted strings #345: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:58: + asm volatile goto("1:.byte 0xe5; \ WARNING: line length of 81 exceeds 80 columns #347: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:60: + .long (((%l[l_break] - 1b - 8) / 8) & 0xffff) << 16; \ WARNING: Avoid unnecessary line continuations #348: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:61: + .short 0" \ WARNING: Avoid line continuations in quoted strings #348: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:61: + .short 0" \ WARNING: labels should not be indented #351: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:64: + l_break: ret = false; \ WARNING: labels should not be indented #352: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:65: + l_continue:; \ WARNING: Argument 'expr' is not used in function-like macro #356: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:69: +#define __cond_break(expr) \ + ({ __label__ l_break, l_continue; \ + asm volatile goto("1:.byte 0xe5; \ WARNING: Macros with flow control statements should be avoided #356: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:69: +#define __cond_break(expr) \ + ({ __label__ l_break, l_continue; \ + asm volatile goto("1:.byte 0xe5; \ WARNING: Avoid line continuations in quoted strings #358: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:71: + asm volatile goto("1:.byte 0xe5; \ WARNING: line length of 81 exceeds 80 columns #360: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:73: + .long (((%l[l_break] - 1b - 8) / 8) & 0xffff) << 16; \ WARNING: Avoid unnecessary line continuations #361: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:74: + .short 0" \ WARNING: Avoid line continuations in quoted strings #361: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:74: + .short 0" \ WARNING: labels should not be indented #364: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:77: + l_break: expr; \ WARNING: labels should not be indented #365: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:78: + l_continue:; \ WARNING: Macros with flow control statements should be avoided #371: FILE: tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h:84: +#define cond_break_label(label) __cond_break(goto label) total: 0 errors, 36 warnings, 0 checks, 372 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 f7952198cbc5 ("selftests/bpf: Move arena-related headers into libarena") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE FILE_PATH_CHANGES 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, 36 warnings, 0 checks, 372 lines checked