Lines Matching refs:nrbits
234 …atic void pack_bits(const struct ubifs_info *c, uint8_t **addr, int *pos, uint32_t val, int nrbits) in pack_bits() argument
239 ubifs_assert(c, nrbits > 0); in pack_bits()
240 ubifs_assert(c, nrbits <= 32); in pack_bits()
243 ubifs_assert(c, (val >> nrbits) == 0 || nrbits == 32); in pack_bits()
246 nrbits += b; in pack_bits()
247 if (nrbits > 8) { in pack_bits()
249 if (nrbits > 16) { in pack_bits()
251 if (nrbits > 24) { in pack_bits()
253 if (nrbits > 32) in pack_bits()
260 if (nrbits > 8) { in pack_bits()
262 if (nrbits > 16) { in pack_bits()
264 if (nrbits > 24) in pack_bits()
269 b = nrbits & 7; in pack_bits()
285 uint32_t ubifs_unpack_bits(const struct ubifs_info *c, uint8_t **addr, int *pos, int nrbits) in ubifs_unpack_bits() argument
287 const int k = 32 - nrbits; in ubifs_unpack_bits()
291 const int bytes = (nrbits + b + 7) >> 3; in ubifs_unpack_bits()
293 ubifs_assert(c, nrbits > 0); in ubifs_unpack_bits()
294 ubifs_assert(c, nrbits <= 32); in ubifs_unpack_bits()
316 nrbits += b; in ubifs_unpack_bits()
338 b = nrbits & 7; in ubifs_unpack_bits()
339 p += nrbits >> 3; in ubifs_unpack_bits()
342 ubifs_assert(c, (val >> nrbits) == 0 || nrbits - b == 32); in ubifs_unpack_bits()