Lines Matching refs:blk
96 dblock_addr(const struct dblock *blk) in dblock_addr() argument
98 return le32_to_cpu(blk->addr); in dblock_addr()
102 dblock_len(const struct dblock *blk) in dblock_len() argument
104 return le16_to_cpu(blk->len); in dblock_len()
256 const struct dblock *blk = (const struct dblock *) first_block; in hermes_blocks_length() local
260 end -= sizeof(*blk); in hermes_blocks_length()
264 while (((void *) blk <= end) && in hermes_blocks_length()
265 (dblock_addr(blk) != BLOCK_END)) { in hermes_blocks_length()
266 len = dblock_len(blk); in hermes_blocks_length()
267 total_len += sizeof(*blk) + len; in hermes_blocks_length()
268 blk = (struct dblock *) &blk->data[len]; in hermes_blocks_length()
279 const struct dblock *blk; in hermes_program() local
284 blk = (const struct dblock *) first_block; in hermes_program()
286 if ((void *) blk > (end - sizeof(*blk))) in hermes_program()
289 blkaddr = dblock_addr(blk); in hermes_program()
290 blklen = dblock_len(blk); in hermes_program()
293 (((void *) blk + blklen) <= end)) { in hermes_program()
297 err = hw->ops->program(hw, blk->data, blkaddr, blklen); in hermes_program()
301 blk = (const struct dblock *) &blk->data[blklen]; in hermes_program()
303 if ((void *) blk > (end - sizeof(*blk))) in hermes_program()
306 blkaddr = dblock_addr(blk); in hermes_program()
307 blklen = dblock_len(blk); in hermes_program()