Lines Matching full:quirks
13 #define __pack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks) \ argument
22 pbuflen, quirks); \
26 #define __unpack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks) \ argument
33 pbuflen, quirks); \
43 * @quirks: mask of QUIRK_LSW32_IS_FIRST and QUIRK_LITTLE_ENDIAN
61 static size_t calculate_box_addr(size_t box, size_t len, u8 quirks) in calculate_box_addr() argument
66 if (quirks & QUIRK_LSW32_IS_FIRST) in calculate_box_addr()
73 if (quirks & QUIRK_LITTLE_ENDIAN) in calculate_box_addr()
82 size_t pbuflen, u8 quirks) in __pack() argument
101 * no quirks, u8 by u8 (aligned at u8 boundaries), from high to low in __pack()
139 * adjusted for quirks. The adjusted box_addr will be used for in __pack()
143 box_addr = calculate_box_addr(box, pbuflen, quirks); in __pack()
150 if (quirks & QUIRK_MSB_ON_THE_RIGHT) { in __pack()
165 * @startbit: The index (in logical notation, compensated for quirks) where
168 * @endbit: The index (in logical notation, compensated for quirks) where
172 * @quirks: A bit mask of QUIRK_LITTLE_ENDIAN, QUIRK_LSW32_IS_FIRST and
180 u8 quirks) in pack() argument
192 __pack(pbuf, uval, startbit, endbit, pbuflen, quirks); in pack()
199 size_t pbuflen, u8 quirks) in __unpack() argument
212 * no quirks, u8 by u8 (aligned at u8 boundaries), from high to low in __unpack()
250 * adjusted for quirks. The adjusted box_addr will be used for in __unpack()
254 box_addr = calculate_box_addr(box, pbuflen, quirks); in __unpack()
259 if (quirks & QUIRK_MSB_ON_THE_RIGHT) in __unpack()
276 * @startbit: The index (in logical notation, compensated for quirks) where
279 * @endbit: The index (in logical notation, compensated for quirks) where
283 * @quirks: A bit mask of QUIRK_LITTLE_ENDIAN, QUIRK_LSW32_IS_FIRST and
291 size_t pbuflen, u8 quirks) in unpack() argument
307 __unpack(pbuf, uval, startbit, endbit, pbuflen, quirks); in unpack()
321 * @startbit: The index (in logical notation, compensated for quirks) where
324 * @endbit: The index (in logical notation, compensated for quirks) where
332 * @quirks: A bit mask of QUIRK_LITTLE_ENDIAN, QUIRK_LSW32_IS_FIRST and
343 enum packing_op op, u8 quirks) in packing() argument
346 return pack(pbuf, *uval, startbit, endbit, pbuflen, quirks); in packing()
348 return unpack(pbuf, uval, startbit, endbit, pbuflen, quirks); in packing()
396 * @quirks: A bit mask of QUIRK_LITTLE_ENDIAN, QUIRK_LSW32_IS_FIRST and
403 u8 quirks) in pack_fields_u8() argument
405 __pack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks); in pack_fields_u8()
419 * @quirks: A bit mask of QUIRK_LITTLE_ENDIAN, QUIRK_LSW32_IS_FIRST and
426 u8 quirks) in pack_fields_u16() argument
428 __pack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks); in pack_fields_u16()
442 * @quirks: A bit mask of QUIRK_LITTLE_ENDIAN, QUIRK_LSW32_IS_FIRST and
449 u8 quirks) in unpack_fields_u8() argument
451 __unpack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks); in unpack_fields_u8()
465 * @quirks: A bit mask of QUIRK_LITTLE_ENDIAN, QUIRK_LSW32_IS_FIRST and
472 u8 quirks) in unpack_fields_u16() argument
474 __unpack_fields(pbuf, pbuflen, ustruct, fields, num_fields, quirks); in unpack_fields_u16()