ERROR: Macros with multiple statements should be enclosed in a do - while loop #94: FILE: include/linux/packing.h:29: +#define GEN_PACKED_FIELD_MEMBERS(__type) \ + __type startbit; \ + __type endbit; \ + __type offset; \ + __type size; WARNING: macros should not use a trailing semicolon #94: FILE: include/linux/packing.h:29: +#define GEN_PACKED_FIELD_MEMBERS(__type) \ + __type startbit; \ + __type endbit; \ + __type offset; \ + __type size; WARNING: line length of 90 exceeds 80 columns #127: FILE: include/linux/packing.h:62: + BUILD_BUG_ON(__f.size != 1 && __f.size != 2 && __f.size != 4 && __f.size != 8); }) WARNING: line length of 89 exceeds 80 columns #131: FILE: include/linux/packing.h:66: + BUILD_BUG_ON(max(_f1.endbit, _f2.endbit) <= min(_f1.startbit, _f2.startbit)); }) CHECK: Alignment should match open parenthesis #148: FILE: include/linux/packing.h:83: +void unpack_fields_m(const void *pbuf, size_t pbuflen, void *ustruct, + const struct packed_field_m *fields, size_t num_fields, WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #165: new file mode 100644 WARNING: line length of 82 exceeds 80 columns #180: FILE: lib/gen_packing_checks.c:11: + printf("#define CHECK_PACKED_FIELDS_%d(fields, pbuflen) \\\n", i); WARNING: line length of 106 exceeds 80 columns #181: FILE: lib/gen_packing_checks.c:12: + printf("\t({ typeof(&(fields)[0]) _f = (fields); typeof(pbuflen) _len = (pbuflen); \\\n"); WARNING: line length of 91 exceeds 80 columns #193: FILE: lib/gen_packing_checks.c:24: + printf("\tCHECK_PACKED_FIELD_OVERLAP(_f[%d], _f[%d]);%s\n", WARNING: line length of 81 exceeds 80 columns #214: FILE: lib/packing.c:13: +#define __pack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks) \ WARNING: line length of 81 exceeds 80 columns #215: FILE: lib/packing.c:14: + ({ \ WARNING: line length of 81 exceeds 80 columns #216: FILE: lib/packing.c:15: + for (size_t i = 0; i < (num_fields); i++) { \ WARNING: line length of 81 exceeds 80 columns #217: FILE: lib/packing.c:16: + typeof(&(fields)[0]) field = &(fields)[i]; \ WARNING: line length of 81 exceeds 80 columns #218: FILE: lib/packing.c:17: + u64 uval; \ WARNING: line length of 81 exceeds 80 columns #219: FILE: lib/packing.c:18: + \ WARNING: line length of 91 exceeds 80 columns #220: FILE: lib/packing.c:19: + uval = ustruct_field_to_u64(ustruct, field->offset, field->size); \ WARNING: line length of 81 exceeds 80 columns #221: FILE: lib/packing.c:20: + \ WARNING: line length of 81 exceeds 80 columns #222: FILE: lib/packing.c:21: + __pack(pbuf, uval, field->startbit, field->endbit, \ WARNING: line length of 81 exceeds 80 columns #223: FILE: lib/packing.c:22: + pbuflen, quirks); \ WARNING: line length of 81 exceeds 80 columns #224: FILE: lib/packing.c:23: + } \ WARNING: line length of 81 exceeds 80 columns #227: FILE: lib/packing.c:26: +#define __unpack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks) \ WARNING: line length of 81 exceeds 80 columns #228: FILE: lib/packing.c:27: + ({ \ WARNING: line length of 81 exceeds 80 columns #229: FILE: lib/packing.c:28: + for (size_t i = 0; i < (num_fields); i++) { \ WARNING: line length of 81 exceeds 80 columns #230: FILE: lib/packing.c:29: + typeof(&(fields)[0]) field = &fields[i]; \ WARNING: line length of 81 exceeds 80 columns #231: FILE: lib/packing.c:30: + u64 uval; \ WARNING: line length of 81 exceeds 80 columns #232: FILE: lib/packing.c:31: + \ WARNING: line length of 81 exceeds 80 columns #233: FILE: lib/packing.c:32: + __unpack(pbuf, &uval, field->startbit, field->endbit, \ WARNING: line length of 81 exceeds 80 columns #234: FILE: lib/packing.c:33: + pbuflen, quirks); \ WARNING: line length of 81 exceeds 80 columns #235: FILE: lib/packing.c:34: + \ WARNING: line length of 90 exceeds 80 columns #236: FILE: lib/packing.c:35: + u64_to_ustruct_field(ustruct, field->offset, field->size, uval); \ WARNING: line length of 81 exceeds 80 columns #237: FILE: lib/packing.c:36: + } \ WARNING: line length of 81 exceeds 80 columns #249: FILE: lib/packing.c:198: +static void __unpack(const void *pbuf, u64 *uval, size_t startbit, size_t endbit, CHECK: Alignment should match open parenthesis #327: FILE: lib/packing.c:421: +void pack_fields_m(void *pbuf, size_t pbuflen, const void *ustruct, + const struct packed_field_m *fields, size_t num_fields, CHECK: Alignment should match open parenthesis #369: FILE: lib/packing.c:463: +void unpack_fields_m(const void *pbuf, size_t pbuflen, void *ustruct, + const struct packed_field_m *fields, size_t num_fields, total: 1 errors, 30 warnings, 3 checks, 298 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 d74a7b5775f7 ("lib: packing: add pack_fields() and unpack_fields()") 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.