Lines Matching refs:length
261 static void print_buffer(const u8 *ptr, u32 length) in print_buffer() argument
264 print_hex_dump_bytes("OPAL: ", DUMP_PREFIX_OFFSET, ptr, length); in print_buffer()
435 u32 hlen = be32_to_cpu(hdr->length); in opal_discovery0_end()
488 cpos += body->length + 4; in opal_discovery0_end()
644 static int build_locking_range(u8 *buffer, size_t length, u8 lr) in build_locking_range() argument
646 if (length > OPAL_UID_LENGTH) { in build_locking_range()
662 static int build_locking_user(u8 *buffer, size_t length, u8 lr) in build_locking_user() argument
664 if (length > OPAL_UID_LENGTH) { in build_locking_user()
715 hdr->subpkt.length = cpu_to_be32(cmd->pos - sizeof(*hdr)); in cmd_finalize()
723 hdr->pkt.length = cpu_to_be32(cmd->pos - sizeof(hdr->cp) - in cmd_finalize()
725 hdr->cp.length = cpu_to_be32(cmd->pos - sizeof(hdr->cp)); in cmd_finalize()
848 static int response_parse(const u8 *buf, size_t length, in response_parse() argument
869 clen = be32_to_cpu(hdr->cp.length); in response_parse()
870 plen = be32_to_cpu(hdr->pkt.length); in response_parse()
871 slen = be32_to_cpu(hdr->subpkt.length); in response_parse()
883 if (pos > buf + length) in response_parse()