CHECK: Alignment should match open parenthesis #78: FILE: src/include/sof/trace.h:130: +void _trace_event_mbox_atomic2(uint32_t log_entry, uint32_t param1, + uint32_t param2); CHECK: Alignment should match open parenthesis #81: FILE: src/include/sof/trace.h:133: +void _trace_event3(uint32_t log_entry, uint32_t param1, uint32_t param2, + uint32_t param3); CHECK: Alignment should match open parenthesis #83: FILE: src/include/sof/trace.h:135: +void _trace_event_mbox3(uint32_t log_entry, uint32_t param1, uint32_t param2, + uint32_t param3); CHECK: Alignment should match open parenthesis #85: FILE: src/include/sof/trace.h:137: +void _trace_event_atomic3(uint32_t log_entry, uint32_t param1, uint32_t param2, + uint32_t param3); CHECK: Alignment should match open parenthesis #87: FILE: src/include/sof/trace.h:139: +void _trace_event_mbox_atomic3(uint32_t log_entry, uint32_t param1, + uint32_t param2, uint32_t param3); CHECK: Macro argument reuse 'format' - possible side-effects? #98: FILE: src/include/sof/trace.h:150: +#define _DECLARE_LOG_ENTRY(lvl, format, comp_id, params)\ + __attribute__((section(".static_log." #lvl))) \ + __attribute__((aligned(128))) \ + static const struct { \ + uint32_t level; \ + uint32_t component_id; \ + uint32_t params_num; \ + uint32_t line_idx; \ + uint32_t file_name_len; \ + const char file_name[sizeof(__FILE__)]; \ + uint32_t text_len; \ + const char text[sizeof(format)]; \ + } log_entry = { \ + lvl, \ + comp_id, \ + params, \ + __LINE__, \ + sizeof(__FILE__), \ + __FILE__, \ + sizeof(format), \ + format \ + } WARNING: __aligned(size) is preferred over __attribute__((aligned(size))) #100: FILE: src/include/sof/trace.h:152: + __attribute__((aligned(128))) \ CHECK: Avoid CamelCase: #123: FILE: src/include/sof/trace.h:175: + typedef void(*LogFunction)(); \ ERROR: space required after that ',' (ctx:VxO) #153: FILE: src/include/sof/trace.h:201: + _log_message(_mbox,, LOG_LEVEL_VERBOSE, __c, __e, ##__VA_ARGS__) ^ ERROR: space required after that ',' (ctx:BxO) #163: FILE: src/include/sof/trace.h:207: + _log_message(,, LOG_LEVEL_VERBOSE, __c, __e, ##__VA_ARGS__) ^ ERROR: space required after that ',' (ctx:BxO) #201: FILE: src/include/sof/trace.h:233: + _log_message(,, LOG_LEVEL_CRITICAL, __c, __e, ##__VA_ARGS__) ^ WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #395: FILE: src/lib/trace.c:50: +void put_header(volatile uint32_t *dst, uint64_t timestamp); WARNING: externs should be avoided in .c files #395: FILE: src/lib/trace.c:50: +void put_header(volatile uint32_t *dst, uint64_t timestamp); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #396: FILE: src/lib/trace.c:51: +void put_header(volatile uint32_t *dst, uint64_t timestamp) CHECK: Alignment should match open parenthesis #456: FILE: src/lib/trace.c:101: + dtrace_event_atomic((const char *)dt, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #473: FILE: src/lib/trace.c:115: + volatile uint32_t *t; WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #494: FILE: src/lib/trace.c:131: + t = (volatile uint32_t *)(MAILBOX_TRACE_BASE + trace->pos); CHECK: Alignment should match open parenthesis #512: FILE: src/lib/trace.c:145: + dcache_writeback_region((void *)t, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #520: FILE: src/lib/trace.c:150: + volatile uint32_t *t; CHECK: Alignment should match open parenthesis #539: FILE: src/lib/trace.c:166: + dtrace_event_atomic((const char *)dt, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #544: FILE: src/lib/trace.c:169: + t = (volatile uint32_t *)(MAILBOX_TRACE_BASE + trace->pos); CHECK: Alignment should match open parenthesis #556: FILE: src/lib/trace.c:181: + dcache_writeback_region((void *)t, + sizeof(uint32_t) * message_size_dwords); CHECK: Alignment should match open parenthesis #594: FILE: src/lib/trace.c:219: + dtrace_event_atomic((const char *)dt, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #608: FILE: src/lib/trace.c:233: + volatile uint32_t *t; WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #625: FILE: src/lib/trace.c:250: + t = (volatile uint32_t *)(MAILBOX_TRACE_BASE + trace->pos); CHECK: Alignment should match open parenthesis #640: FILE: src/lib/trace.c:265: + dcache_writeback_region((void *)t, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #645: FILE: src/lib/trace.c:270: + volatile uint32_t *t; CHECK: Alignment should match open parenthesis #662: FILE: src/lib/trace.c:287: + dtrace_event_atomic((const char *)dt, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #665: FILE: src/lib/trace.c:290: + t = (volatile uint32_t *)(MAILBOX_TRACE_BASE + trace->pos); CHECK: Alignment should match open parenthesis #678: FILE: src/lib/trace.c:303: + dcache_writeback_region((void *)t, + sizeof(uint32_t) * message_size_dwords); CHECK: Alignment should match open parenthesis #718: FILE: src/lib/trace.c:343: + dtrace_event_atomic((const char *)dt, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #732: FILE: src/lib/trace.c:357: + volatile uint32_t *t; WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #750: FILE: src/lib/trace.c:375: + t = (volatile uint32_t *)(MAILBOX_TRACE_BASE + trace->pos); CHECK: Alignment should match open parenthesis #766: FILE: src/lib/trace.c:391: + dcache_writeback_region((void *)t, + sizeof(uint32_t) * message_size_dwords); CHECK: Alignment should match open parenthesis #770: FILE: src/lib/trace.c:395: +void _trace_event_mbox_atomic2(uint32_t log_entry, uint32_t param1, + uint32_t param2) WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #772: FILE: src/lib/trace.c:397: + volatile uint32_t *t; CHECK: Alignment should match open parenthesis #790: FILE: src/lib/trace.c:415: + dtrace_event_atomic((const char *)dt, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #793: FILE: src/lib/trace.c:418: + t = (volatile uint32_t *)(MAILBOX_TRACE_BASE + trace->pos); CHECK: Alignment should match open parenthesis #807: FILE: src/lib/trace.c:432: + dcache_writeback_region((void *)t, + sizeof(uint32_t) * message_size_dwords); CHECK: Alignment should match open parenthesis #812: FILE: src/lib/trace.c:437: +void _trace_event3(uint32_t log_entry, uint32_t param1, uint32_t param2, + uint32_t param3) CHECK: Alignment should match open parenthesis #833: FILE: src/lib/trace.c:458: +void _trace_event_atomic3(uint32_t log_entry, uint32_t param1, uint32_t param2, + uint32_t param3) CHECK: Alignment should match open parenthesis #851: FILE: src/lib/trace.c:476: + dtrace_event_atomic((const char *)dt, + sizeof(uint32_t) * message_size_dwords); CHECK: Alignment should match open parenthesis #856: FILE: src/lib/trace.c:481: +void _trace_event_mbox3(uint32_t log_entry, uint32_t param1, uint32_t param2, + uint32_t param3) WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #866: FILE: src/lib/trace.c:491: + volatile uint32_t *t; WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #885: FILE: src/lib/trace.c:510: + t = (volatile uint32_t *)(MAILBOX_TRACE_BASE + trace->pos); CHECK: Alignment should match open parenthesis #902: FILE: src/lib/trace.c:527: + dcache_writeback_region((void *)t, + sizeof(uint32_t) * message_size_dwords); CHECK: Alignment should match open parenthesis #906: FILE: src/lib/trace.c:531: +void _trace_event_mbox_atomic3(uint32_t log_entry, uint32_t param1, + uint32_t param2, uint32_t param3) WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #908: FILE: src/lib/trace.c:533: + volatile uint32_t *t; CHECK: Alignment should match open parenthesis #927: FILE: src/lib/trace.c:552: + dtrace_event_atomic((const char *)dt, + sizeof(uint32_t) * message_size_dwords); WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #930: FILE: src/lib/trace.c:555: + t = (volatile uint32_t *)(MAILBOX_TRACE_BASE + trace->pos); CHECK: Alignment should match open parenthesis #949: FILE: src/lib/trace.c:570: + dcache_writeback_region((void *)t, + sizeof(uint32_t) * message_size_dwords); total: 3 errors, 20 warnings, 28 checks, 1056 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. 0001-debugability-logging-Redesign-tracing-mechanism-to-e.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.