Lines Matching refs:addr
217 * @addr: address at which to pack (passed and next address returned)
222 static void pack_bits(const struct ubifs_info *c, uint8_t **addr, int *pos, uint32_t val, int nrbits)
224 uint8_t *p = *addr;
260 *addr = p;
267 * @addr: address at which to unpack (passed and next address returned)
273 uint32_t ubifs_unpack_bits(const struct ubifs_info *c, uint8_t **addr, int *pos, int nrbits)
276 uint8_t *p = *addr;
328 *addr = p;
343 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
347 pack_bits(c, &addr, &pos, UBIFS_LPT_PNODE, UBIFS_LPT_TYPE_BITS);
349 pack_bits(c, &addr, &pos, pnode->num, c->pcnt_bits);
351 pack_bits(c, &addr, &pos, pnode->lprops[i].free >> 3,
353 pack_bits(c, &addr, &pos, pnode->lprops[i].dirty >> 3,
356 pack_bits(c, &addr, &pos, 1, 1);
358 pack_bits(c, &addr, &pos, 0, 1);
362 addr = buf;
364 pack_bits(c, &addr, &pos, crc, UBIFS_LPT_CRC_BITS);
376 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
380 pack_bits(c, &addr, &pos, UBIFS_LPT_NNODE, UBIFS_LPT_TYPE_BITS);
382 pack_bits(c, &addr, &pos, nnode->num, c->pcnt_bits);
388 pack_bits(c, &addr, &pos, lnum - c->lpt_first, c->lpt_lnum_bits);
389 pack_bits(c, &addr, &pos, nnode->nbranch[i].offs,
394 addr = buf;
396 pack_bits(c, &addr, &pos, crc, UBIFS_LPT_CRC_BITS);
408 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
412 pack_bits(c, &addr, &pos, UBIFS_LPT_LTAB, UBIFS_LPT_TYPE_BITS);
414 pack_bits(c, &addr, &pos, ltab[i].free, c->lpt_spc_bits);
415 pack_bits(c, &addr, &pos, ltab[i].dirty, c->lpt_spc_bits);
419 addr = buf;
421 pack_bits(c, &addr, &pos, crc, UBIFS_LPT_CRC_BITS);
432 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
436 pack_bits(c, &addr, &pos, UBIFS_LPT_LSAVE, UBIFS_LPT_TYPE_BITS);
438 pack_bits(c, &addr, &pos, lsave[i], c->lnum_bits);
441 addr = buf;
443 pack_bits(c, &addr, &pos, crc, UBIFS_LPT_CRC_BITS);
927 uint8_t *addr = buf;
930 crc = ubifs_unpack_bits(c, &addr, &pos, UBIFS_LPT_CRC_BITS);
945 * @addr: address of type bit field is passed and returned updated here
951 static int check_lpt_type(const struct ubifs_info *c, uint8_t **addr,
956 node_type = ubifs_unpack_bits(c, addr, pos, UBIFS_LPT_TYPE_BITS);
977 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
980 err = check_lpt_type(c, &addr, &pos, UBIFS_LPT_PNODE);
984 pnode->num = ubifs_unpack_bits(c, &addr, &pos, c->pcnt_bits);
988 lprops->free = ubifs_unpack_bits(c, &addr, &pos, c->space_bits);
990 lprops->dirty = ubifs_unpack_bits(c, &addr, &pos, c->space_bits);
993 if (ubifs_unpack_bits(c, &addr, &pos, 1))
1014 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
1017 err = check_lpt_type(c, &addr, &pos, UBIFS_LPT_NNODE);
1021 nnode->num = ubifs_unpack_bits(c, &addr, &pos, c->pcnt_bits);
1025 lnum = ubifs_unpack_bits(c, &addr, &pos, c->lpt_lnum_bits) +
1030 nnode->nbranch[i].offs = ubifs_unpack_bits(c, &addr, &pos,
1046 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
1049 err = check_lpt_type(c, &addr, &pos, UBIFS_LPT_LTAB);
1053 int free = ubifs_unpack_bits(c, &addr, &pos, c->lpt_spc_bits);
1054 int dirty = ubifs_unpack_bits(c, &addr, &pos, c->lpt_spc_bits);
1078 uint8_t *addr = buf + UBIFS_LPT_CRC_BYTES;
1081 err = check_lpt_type(c, &addr, &pos, UBIFS_LPT_LSAVE);
1085 int lnum = ubifs_unpack_bits(c, &addr, &pos, c->lnum_bits);