Packed structs are good for managing protocols, but bad for most everything else. When data is read from the MCP2210, the packed structs are perfect. However, they need to be copied out of these and into unpacked structs for any further processing (including storage for later use). This also introduces the perfect time and place for endianness flipping. Thus, our packed structs can use le types and if the unpacked structs use non-le types, then sparse will tell us if we fuck anything up! (make C=1 EXTRA_CPPFLAGS=-D__CHECK_ENDIAN__)
Packed structs are good for managing protocols, but bad for most everything else. When data is read from the MCP2210, the packed structs are perfect. However, they need to be copied out of these and into unpacked structs for any further processing (including storage for later use). This also introduces the perfect time and place for endianness flipping. Thus, our packed structs can use le types and if the unpacked structs use non-le types, then sparse will tell us if we fuck anything up! (make C=1 EXTRA_CPPFLAGS=-D__CHECK_ENDIAN__)