ERROR: Macros with multiple statements should be enclosed in a do - while loop #208: FILE: include/linux/packing_types.h:14: +#define GEN_PACKED_FIELD_MEMBERS(__type) \ + __type startbit; \ + __type endbit; \ + __type offset; \ + __type size; WARNING: macros should not use a trailing semicolon #208: FILE: include/linux/packing_types.h:14: +#define GEN_PACKED_FIELD_MEMBERS(__type) \ + __type startbit; \ + __type endbit; \ + __type offset; \ + __type size; WARNING: line length of 81 exceeds 80 columns #262: FILE: lib/packing.c:13: +#define __pack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks) \ WARNING: line length of 81 exceeds 80 columns #263: FILE: lib/packing.c:14: + ({ \ WARNING: line length of 81 exceeds 80 columns #264: FILE: lib/packing.c:15: + for (size_t i = 0; i < (num_fields); i++) { \ WARNING: line length of 81 exceeds 80 columns #265: FILE: lib/packing.c:16: + typeof(&(fields)[0]) field = &(fields)[i]; \ WARNING: line length of 81 exceeds 80 columns #266: FILE: lib/packing.c:17: + u64 uval; \ WARNING: line length of 81 exceeds 80 columns #267: FILE: lib/packing.c:18: + \ WARNING: line length of 91 exceeds 80 columns #268: FILE: lib/packing.c:19: + uval = ustruct_field_to_u64(ustruct, field->offset, field->size); \ WARNING: line length of 81 exceeds 80 columns #269: FILE: lib/packing.c:20: + \ WARNING: line length of 81 exceeds 80 columns #270: FILE: lib/packing.c:21: + __pack(pbuf, uval, field->startbit, field->endbit, \ WARNING: line length of 81 exceeds 80 columns #271: FILE: lib/packing.c:22: + pbuflen, quirks); \ WARNING: line length of 81 exceeds 80 columns #272: FILE: lib/packing.c:23: + } \ WARNING: line length of 81 exceeds 80 columns #275: FILE: lib/packing.c:26: +#define __unpack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks) \ WARNING: line length of 81 exceeds 80 columns #276: FILE: lib/packing.c:27: + ({ \ WARNING: line length of 81 exceeds 80 columns #277: FILE: lib/packing.c:28: + for (size_t i = 0; i < (num_fields); i++) { \ WARNING: line length of 81 exceeds 80 columns #278: FILE: lib/packing.c:29: + typeof(&(fields)[0]) field = &fields[i]; \ WARNING: line length of 81 exceeds 80 columns #279: FILE: lib/packing.c:30: + u64 uval; \ WARNING: line length of 81 exceeds 80 columns #280: FILE: lib/packing.c:31: + \ WARNING: line length of 81 exceeds 80 columns #281: FILE: lib/packing.c:32: + __unpack(pbuf, &uval, field->startbit, field->endbit, \ WARNING: line length of 81 exceeds 80 columns #282: FILE: lib/packing.c:33: + pbuflen, quirks); \ WARNING: line length of 81 exceeds 80 columns #283: FILE: lib/packing.c:34: + \ WARNING: line length of 90 exceeds 80 columns #284: FILE: lib/packing.c:35: + u64_to_ustruct_field(ustruct, field->offset, field->size, uval); \ WARNING: line length of 81 exceeds 80 columns #285: FILE: lib/packing.c:36: + } \ WARNING: line length of 81 exceeds 80 columns #297: FILE: lib/packing.c:198: +static void __unpack(const void *pbuf, u64 *uval, size_t startbit, size_t endbit, WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #583: FILE: scripts/mod/modpost.h:166: + unsigned value; /* Used to compute the hash value. */ WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #584: FILE: scripts/mod/modpost.h:167: + unsigned i; /* Used to cycle through random values. */ CHECK: spaces preferred around that '*' (ctx:VxV) #588: FILE: scripts/mod/modpost.h:171: + value = (value + (((unsigned char *)name)[i] << (i*5 % 24))); ^ CHECK: Prefer kernel type 'u16' over 'uint16_t' #637: FILE: scripts/mod/packed_fields.c:17: +typedef uint16_t u16; CHECK: Prefer kernel type 'u8' over 'uint8_t' #638: FILE: scripts/mod/packed_fields.c:18: +typedef uint8_t u8; CHECK: Prefer kernel type 'u64' over 'uint64_t' #649: FILE: scripts/mod/packed_fields.c:29: + uint64_t startbit; CHECK: Prefer kernel type 'u64' over 'uint64_t' #650: FILE: scripts/mod/packed_fields.c:30: + uint64_t endbit; CHECK: Prefer kernel type 'u64' over 'uint64_t' #651: FILE: scripts/mod/packed_fields.c:31: + uint64_t offset; CHECK: Prefer kernel type 'u64' over 'uint64_t' #652: FILE: scripts/mod/packed_fields.c:32: + uint64_t size; WARNING: line length of 87 exceeds 80 columns #669: FILE: scripts/mod/packed_fields.c:49: + error("attempted to get field size for unknown packed field type %u\n", WARNING: line length of 91 exceeds 80 columns #698: FILE: scripts/mod/packed_fields.c:78: + error("attempted to get field contents for unknown packed field type %u\n", WARNING: line length of 100 exceeds 80 columns #798: FILE: scripts/mod/packed_fields.c:178: + error("%s has buffer size %zu, but symbol %s says the size should be %zu\n", WARNING: line length of 110 exceeds 80 columns #831: FILE: scripts/mod/packed_fields.c:211: + error("symbol %s of module %s has size %zu which is not a multiple of the field size (%zu)\n", WARNING: line length of 124 exceeds 80 columns #845: FILE: scripts/mod/packed_fields.c:225: + error("\"%s\" [%s.ko] element %u startbit (%" PRIu64 ") must be larger than endbit (%" PRIu64 ")\n", WARNING: line length of 142 exceeds 80 columns #850: FILE: scripts/mod/packed_fields.c:230: + error("\"%s\" [%s.ko] element %u startbit (%" PRIu64 ") puts field outsize of the packed buffer size (%" PRIu64 ")\n", WARNING: line length of 201 exceeds 80 columns #855: FILE: scripts/mod/packed_fields.c:235: + error("\"%s\" [%s.ko] element %u startbit (%" PRIu64 ") and endbit (%" PRIu64 ") indicate a field of width (%" PRIu64 ") which does not fit into the field size (%" PRIu64 ")\n", WARNING: line length of 89 exceeds 80 columns #860: FILE: scripts/mod/packed_fields.c:240: + if (elem.size != 1 && elem.size != 2 && elem.size != 4 && elem.size != 8) WARNING: line length of 101 exceeds 80 columns #861: FILE: scripts/mod/packed_fields.c:241: + error("\"%s\" [%s.ko] element %u size (%" PRIu64 ") must be 1, 2, 4, or 8\n", WARNING: line length of 180 exceeds 80 columns #879: FILE: scripts/mod/packed_fields.c:259: + error("\"%s\" [%s.ko] element %u startbit (%" PRIu64 ") expected to be arranged in ascending order, but previous element startbit is %" PRIu64 "\n", WARNING: line length of 176 exceeds 80 columns #883: FILE: scripts/mod/packed_fields.c:263: + error("\"%s\" [%s.ko] element %u endbit (%" PRIu64 ") expected to be arranged in ascending order, but previous element endbit is %" PRIu64 "\n", WARNING: line length of 181 exceeds 80 columns #890: FILE: scripts/mod/packed_fields.c:270: + error("\"%s\" [%s.ko] element %u startbit (%" PRIu64 ") expected to be arranged in descending order, but previous element startbit is %" PRIu64 "\n", WARNING: line length of 177 exceeds 80 columns #894: FILE: scripts/mod/packed_fields.c:274: + error("\"%s\" [%s.ko] element %u endbit (%" PRIu64 ") expected to be arranged in descending order, but previous element endbit is %" PRIu64 "\n", total: 1 errors, 39 warnings, 7 checks, 789 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 fcb83b5e24a4 ("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.