ERROR: Macros with multiple statements should be enclosed in a do - while loop #253: 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 #253: 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 #288: FILE: include/linux/packing.h:64: + BUILD_BUG_ON(__f.size != 1 && __f.size != 2 && __f.size != 4 && __f.size != 8); }) WARNING: line length of 89 exceeds 80 columns #292: FILE: include/linux/packing.h:68: + BUILD_BUG_ON(max(_f1.endbit, _f2.endbit) <= min(_f1.startbit, _f2.startbit)); }) CHECK: Alignment should match open parenthesis #311: FILE: include/linux/packing.h:87: +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? #709: new file mode 100644 WARNING: line length of 82 exceeds 80 columns #886: FILE: lib/gen_packing_checks.c:173: + printf("#define CHECK_PACKED_FIELDS_%d(fields, pbuflen) \\\n", i); WARNING: line length of 106 exceeds 80 columns #887: FILE: lib/gen_packing_checks.c:174: + printf("\t({ typeof(&(fields)[0]) _f = (fields); typeof(pbuflen) _len = (pbuflen); \\\n"); WARNING: line length of 91 exceeds 80 columns #899: FILE: lib/gen_packing_checks.c:186: + printf("\tCHECK_PACKED_FIELD_OVERLAP(_f[%d], _f[%d]);%s\n", WARNING: line length of 81 exceeds 80 columns #920: FILE: lib/packing.c:13: +#define __pack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks) \ WARNING: line length of 81 exceeds 80 columns #921: FILE: lib/packing.c:14: + ({ \ WARNING: line length of 81 exceeds 80 columns #922: FILE: lib/packing.c:15: + for (size_t i = 0; i < (num_fields); i++) { \ WARNING: line length of 81 exceeds 80 columns #923: FILE: lib/packing.c:16: + typeof(&(fields)[0]) field = &(fields)[i]; \ WARNING: line length of 81 exceeds 80 columns #924: FILE: lib/packing.c:17: + u64 uval; \ WARNING: line length of 81 exceeds 80 columns #925: FILE: lib/packing.c:18: + \ WARNING: line length of 91 exceeds 80 columns #926: FILE: lib/packing.c:19: + uval = ustruct_field_to_u64(ustruct, field->offset, field->size); \ WARNING: line length of 81 exceeds 80 columns #927: FILE: lib/packing.c:20: + \ WARNING: line length of 81 exceeds 80 columns #928: FILE: lib/packing.c:21: + __pack(pbuf, uval, field->startbit, field->endbit, \ WARNING: line length of 81 exceeds 80 columns #929: FILE: lib/packing.c:22: + pbuflen, quirks); \ WARNING: line length of 81 exceeds 80 columns #930: FILE: lib/packing.c:23: + } \ WARNING: line length of 81 exceeds 80 columns #933: FILE: lib/packing.c:26: +#define __unpack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks) \ WARNING: line length of 81 exceeds 80 columns #934: FILE: lib/packing.c:27: + ({ \ WARNING: line length of 81 exceeds 80 columns #935: FILE: lib/packing.c:28: + for (size_t i = 0; i < (num_fields); i++) { \ WARNING: line length of 81 exceeds 80 columns #936: FILE: lib/packing.c:29: + typeof(&(fields)[0]) field = &fields[i]; \ WARNING: line length of 81 exceeds 80 columns #937: FILE: lib/packing.c:30: + u64 uval; \ WARNING: line length of 81 exceeds 80 columns #938: FILE: lib/packing.c:31: + \ WARNING: line length of 81 exceeds 80 columns #939: FILE: lib/packing.c:32: + __unpack(pbuf, &uval, field->startbit, field->endbit, \ WARNING: line length of 81 exceeds 80 columns #940: FILE: lib/packing.c:33: + pbuflen, quirks); \ WARNING: line length of 81 exceeds 80 columns #941: FILE: lib/packing.c:34: + \ WARNING: line length of 90 exceeds 80 columns #942: FILE: lib/packing.c:35: + u64_to_ustruct_field(ustruct, field->offset, field->size, uval); \ WARNING: line length of 81 exceeds 80 columns #943: FILE: lib/packing.c:36: + } \ WARNING: line length of 81 exceeds 80 columns #955: 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 #1033: 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 #1075: 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, 994 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 47a8efd2f263 ("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.