Lines Matching refs:length
265 static void print_buffer(const u8 *ptr, u32 length) in print_buffer() argument
268 print_hex_dump_bytes("OPAL: ", DUMP_PREFIX_OFFSET, ptr, length); in print_buffer()
426 u32 hlen = be32_to_cpu(hdr->length); in opal_discovery0_end()
479 cpos += body->length + 4; in opal_discovery0_end()
609 static int build_locking_range(u8 *buffer, size_t length, u8 lr) in build_locking_range() argument
611 if (length > OPAL_UID_LENGTH) { in build_locking_range()
626 static int build_locking_user(u8 *buffer, size_t length, u8 lr) in build_locking_user() argument
628 if (length > OPAL_UID_LENGTH) { in build_locking_user()
672 hdr->subpkt.length = cpu_to_be32(cmd->pos - sizeof(*hdr)); in cmd_finalize()
680 hdr->pkt.length = cpu_to_be32(cmd->pos - sizeof(hdr->cp) - in cmd_finalize()
682 hdr->cp.length = cpu_to_be32(cmd->pos - sizeof(hdr->cp)); in cmd_finalize()
800 static int response_parse(const u8 *buf, size_t length, in response_parse() argument
821 clen = be32_to_cpu(hdr->cp.length); in response_parse()
822 plen = be32_to_cpu(hdr->pkt.length); in response_parse()
823 slen = be32_to_cpu(hdr->subpkt.length); in response_parse()
835 if (pos > buf + length) in response_parse()