/Linux-v4.19/fs/squashfs/ |
D | block.c | 47 u64 *cur_index, int *offset, int *length) in get_block_length() argument 57 *length = (unsigned char) bh->b_data[*offset]; in get_block_length() 62 *length |= (unsigned char) bh->b_data[0] << 8; in get_block_length() 65 *length = (unsigned char) bh->b_data[*offset] | in get_block_length() 91 int squashfs_read_data(struct super_block *sb, u64 index, int length, in squashfs_read_data() argument 100 bh = kcalloc(((output->length + msblk->devblksize - 1) in squashfs_read_data() 105 if (length) { in squashfs_read_data() 110 compressed = SQUASHFS_COMPRESSED_BLOCK(length); in squashfs_read_data() 111 length = SQUASHFS_COMPRESSED_SIZE_BLOCK(length); in squashfs_read_data() 113 *next_index = index + length; in squashfs_read_data() [all …]
|
D | cache.c | 66 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument 123 entry->length = squashfs_read_data(sb, block, length, in squashfs_cache_get() 128 if (entry->length < 0) in squashfs_cache_get() 129 entry->error = entry->length; in squashfs_cache_get() 307 int offset, int length) in squashfs_copy_data() argument 309 int remaining = length; in squashfs_copy_data() 311 if (length == 0) in squashfs_copy_data() 314 return min(length, entry->length - offset); in squashfs_copy_data() 316 while (offset < entry->length) { in squashfs_copy_data() 319 int bytes = min_t(int, entry->length - offset, in squashfs_copy_data() [all …]
|
/Linux-v4.19/sound/usb/line6/ |
D | midibuf.c | 23 static const int length[] = { 3, 3, 3, 3, 2, 2, 3 }; in midibuf_message_length() local 25 message_length = length[(code >> 4) - 8]; in midibuf_message_length() 32 static const int length[] = { -1, 2, -1, 2, -1, -1, 1, 1, 1, 1, in midibuf_message_length() local 35 message_length = length[code & 0x0f]; in midibuf_message_length() 89 int length) in line6_midibuf_write() argument 95 if (midibuf_is_full(this) || (length <= 0)) in line6_midibuf_write() 99 if (data[length - 1] == 0xfe) { in line6_midibuf_write() 100 --length; in line6_midibuf_write() 106 if (length > bytes_free) in line6_midibuf_write() 107 length = bytes_free; in line6_midibuf_write() [all …]
|
/Linux-v4.19/drivers/acpi/acpica/ |
D | exstorob.c | 33 u32 length; in acpi_ex_store_buffer_to_buffer() local 47 length = source_desc->buffer.length; in acpi_ex_store_buffer_to_buffer() 53 if ((target_desc->buffer.length == 0) || in acpi_ex_store_buffer_to_buffer() 55 target_desc->buffer.pointer = ACPI_ALLOCATE(length); in acpi_ex_store_buffer_to_buffer() 60 target_desc->buffer.length = length; in acpi_ex_store_buffer_to_buffer() 65 if (length <= target_desc->buffer.length) { in acpi_ex_store_buffer_to_buffer() 70 target_desc->buffer.length); in acpi_ex_store_buffer_to_buffer() 71 memcpy(target_desc->buffer.pointer, buffer, length); in acpi_ex_store_buffer_to_buffer() 92 target_desc->buffer.length = length; in acpi_ex_store_buffer_to_buffer() 99 target_desc->buffer.length); in acpi_ex_store_buffer_to_buffer() [all …]
|
D | exfield.c | 41 u32 length; in acpi_ex_get_serial_access_length() local 46 length = 0; in acpi_ex_get_serial_access_length() 52 length = 1; in acpi_ex_get_serial_access_length() 58 length = 2; in acpi_ex_get_serial_access_length() 65 length = access_length; in acpi_ex_get_serial_access_length() 72 length = ACPI_GSBUS_BUFFER_SIZE - 2; in acpi_ex_get_serial_access_length() 76 return (length); in acpi_ex_get_serial_access_length() 101 acpi_size length; in acpi_ex_read_data_from_field() local 144 length = ACPI_SMBUS_BUFFER_SIZE; in acpi_ex_read_data_from_field() 150 length = in acpi_ex_read_data_from_field() [all …]
|
D | utids.c | 40 u32 length; in acpi_ut_execute_HID() local 55 length = ACPI_EISAID_STRING_SIZE; in acpi_ut_execute_HID() 57 length = obj_desc->string.length + 1; in acpi_ut_execute_HID() 64 (acpi_size)length); in acpi_ut_execute_HID() 83 hid->length = length; in acpi_ut_execute_HID() 118 u32 length; in acpi_ut_execute_UID() local 133 length = ACPI_MAX64_DECIMAL_DIGITS + 1; in acpi_ut_execute_UID() 135 length = obj_desc->string.length + 1; in acpi_ut_execute_UID() 142 (acpi_size)length); in acpi_ut_execute_UID() 161 uid->length = length; in acpi_ut_execute_UID() [all …]
|
D | tbfadt.c | 37 u16 length; member 278 u32 length; in acpi_tb_parse_fadt() local 295 length = fadt_desc->length; in acpi_tb_parse_fadt() 301 (void)acpi_tb_verify_checksum(table, length); in acpi_tb_parse_fadt() 305 acpi_tb_create_local_fadt(table, length); in acpi_tb_parse_fadt() 354 void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) in acpi_tb_create_local_fadt() argument 361 if (length > sizeof(struct acpi_table_fadt)) { in acpi_tb_create_local_fadt() 366 length, in acpi_tb_create_local_fadt() 377 ACPI_MIN(length, sizeof(struct acpi_table_fadt))); in acpi_tb_create_local_fadt() 444 u8 length; in acpi_tb_convert_fadt() local [all …]
|
/Linux-v4.19/drivers/platform/chrome/ |
D | cros_ec_lpc_reg.c | 29 static u8 lpc_read_bytes(unsigned int offset, unsigned int length, u8 *dest) in lpc_read_bytes() argument 34 for (i = 0; i < length; ++i) { in lpc_read_bytes() 43 static u8 lpc_write_bytes(unsigned int offset, unsigned int length, u8 *msg) in lpc_write_bytes() argument 48 for (i = 0; i < length; ++i) { in lpc_write_bytes() 59 u8 cros_ec_lpc_read_bytes(unsigned int offset, unsigned int length, u8 *dest) in cros_ec_lpc_read_bytes() argument 61 if (length == 0) in cros_ec_lpc_read_bytes() 67 if (WARN_ON(offset + length - 1 > MEC_EMI_RANGE_END)) in cros_ec_lpc_read_bytes() 70 return cros_ec_lpc_io_bytes_mec(MEC_IO_READ, offset, length, in cros_ec_lpc_read_bytes() 74 if (WARN_ON(offset + length > MEC_EMI_RANGE_START && in cros_ec_lpc_read_bytes() 78 return lpc_read_bytes(offset, length, dest); in cros_ec_lpc_read_bytes() [all …]
|
/Linux-v4.19/drivers/video/fbdev/mmp/fb/ |
D | mmpfb.c | 38 if (var->bits_per_pixel == 16 && var->red.length == 8 && in var_to_pixfmt() 39 var->green.length == 4 && var->blue.length == 4) { in var_to_pixfmt() 49 if (var->bits_per_pixel == 12 && var->red.length == 8 && in var_to_pixfmt() 50 var->green.length == 2 && var->blue.length == 2) { in var_to_pixfmt() 60 if (var->bits_per_pixel == 16 && var->red.length == 16 && in var_to_pixfmt() 61 var->green.length == 16 && var->blue.length == 16) { in var_to_pixfmt() 73 if (var->bits_per_pixel == 16 && var->red.length <= 5 && in var_to_pixfmt() 74 var->green.length <= 6 && var->blue.length <= 5) { in var_to_pixfmt() 75 if (var->transp.length == 0) { in var_to_pixfmt() 86 if (var->bits_per_pixel <= 32 && var->red.length <= 8 && in var_to_pixfmt() [all …]
|
/Linux-v4.19/drivers/net/arcnet/ |
D | arc-rawmode.c | 40 struct archdr *pkthdr, int length) in rx() argument 47 arc_printk(D_DURING, dev, "it's a raw packet (length=%d)\n", length); in rx() 49 if (length > MTU) in rx() 50 ofs = 512 - length; in rx() 52 ofs = 256 - length; in rx() 54 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); in rx() 59 skb_put(skb, length + ARC_HDR_SIZE); in rx() 69 if (length > sizeof(pkt->soft)) in rx() 72 length - sizeof(pkt->soft)); in rx() 113 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, in prepare_tx() argument [all …]
|
D | capmode.c | 43 struct archdr *pkthdr, int length) in rx() argument 52 length); in rx() 54 if (length >= MinTU) in rx() 55 ofs = 512 - length; in rx() 57 ofs = 256 - length; in rx() 59 skb = alloc_skb(length + ARC_HDR_SIZE + sizeof(int), GFP_ATOMIC); in rx() 64 skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); in rx() 82 if (length > sizeof(pkt->soft)) in rx() 86 length - sizeof(pkt->soft)); in rx() 132 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, in prepare_tx() argument [all …]
|
D | rfc1051.c | 41 struct archdr *pkthdr, int length); 44 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, 122 struct archdr *pkthdr, int length) in rx() argument 129 arc_printk(D_DURING, dev, "it's a raw packet (length=%d)\n", length); in rx() 131 if (length >= MinTU) in rx() 132 ofs = 512 - length; in rx() 134 ofs = 256 - length; in rx() 136 skb = alloc_skb(length + ARC_HDR_SIZE, GFP_ATOMIC); in rx() 141 skb_put(skb, length + ARC_HDR_SIZE); in rx() 148 if (length > sizeof(pkt->soft)) in rx() [all …]
|
/Linux-v4.19/drivers/staging/erofs/ |
D | unzip_lz4.c | 75 size_t length; in customized_lz4_decompress_safe_partial() local 82 length = token>>ML_BITS; in customized_lz4_decompress_safe_partial() 84 if (length == RUN_MASK) { in customized_lz4_decompress_safe_partial() 89 length += s; in customized_lz4_decompress_safe_partial() 92 if (unlikely((size_t)(op + length) < (size_t)(op))) { in customized_lz4_decompress_safe_partial() 96 if (unlikely((size_t)(ip + length) < (size_t)(ip))) { in customized_lz4_decompress_safe_partial() 103 cpy = op + length; in customized_lz4_decompress_safe_partial() 105 (ip + length > iend - (2 + 1 + LASTLITERALS))) { in customized_lz4_decompress_safe_partial() 107 memcpy(op, ip, length = oend - op); in customized_lz4_decompress_safe_partial() 108 op += length; in customized_lz4_decompress_safe_partial() [all …]
|
/Linux-v4.19/include/linux/ |
D | relay.h | 187 size_t length); 204 size_t length) in relay_write() argument 211 if (unlikely(buf->offset + length > chan->subbuf_size)) in relay_write() 212 length = relay_switch_subbuf(buf, length); in relay_write() 213 memcpy(buf->data + buf->offset, data, length); in relay_write() 214 buf->offset += length; in relay_write() 232 size_t length) in __relay_write() argument 237 if (unlikely(buf->offset + length > buf->chan->subbuf_size)) in __relay_write() 238 length = relay_switch_subbuf(buf, length); in __relay_write() 239 memcpy(buf->data + buf->offset, data, length); in __relay_write() [all …]
|
/Linux-v4.19/include/rdma/ |
D | rdmavt_mr.h | 63 size_t length; member 77 size_t length; member 113 u32 length; /* remaining length of the segment */ member 144 static inline u32 rvt_get_sge_length(struct rvt_sge *sge, u32 length) in rvt_get_sge_length() argument 146 u32 len = sge->length; in rvt_get_sge_length() 148 if (len > length) in rvt_get_sge_length() 149 len = length; in rvt_get_sge_length() 156 static inline void rvt_update_sge(struct rvt_sge_state *ss, u32 length, in rvt_update_sge() argument 161 sge->vaddr += length; in rvt_update_sge() 162 sge->length -= length; in rvt_update_sge() [all …]
|
/Linux-v4.19/security/selinux/ |
D | selinuxfs.c | 127 ssize_t length; in sel_read_enforce() local 129 length = scnprintf(tmpbuf, TMPBUFLEN, "%d", in sel_read_enforce() 131 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); in sel_read_enforce() 142 ssize_t length; in sel_write_enforce() local 156 length = -EINVAL; in sel_write_enforce() 164 length = avc_has_perm(&selinux_state, in sel_write_enforce() 168 if (length) in sel_write_enforce() 185 length = count; in sel_write_enforce() 188 return length; in sel_write_enforce() 206 ssize_t length; in sel_read_handle_unknown() local [all …]
|
/Linux-v4.19/net/sunrpc/auth_gss/ |
D | gss_generic_token.c | 76 der_length_size( int length) in der_length_size() argument 78 if (length < (1<<7)) in der_length_size() 80 else if (length < (1<<8)) in der_length_size() 86 else if (length < (1<<16)) in der_length_size() 88 else if (length < (1<<24)) in der_length_size() 96 der_write_length(unsigned char **buf, int length) in der_write_length() argument 98 if (length < (1<<7)) { in der_write_length() 99 *(*buf)++ = (unsigned char) length; in der_write_length() 101 *(*buf)++ = (unsigned char) (der_length_size(length)+127); in der_write_length() 103 if (length >= (1<<24)) in der_write_length() [all …]
|
/Linux-v4.19/fs/ntfs/ |
D | runlist.c | 165 if ((dst->vcn + dst->length) != src->vcn) in ntfs_are_rl_mergeable() 169 ((dst->lcn + dst->length) == src->lcn)) in ntfs_are_rl_mergeable() 191 dst->length += src->length; in __ntfs_rl_merge() 252 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_append() 256 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_append() 306 merged_length = dst[loc - 1].length; in ntfs_rl_insert() 308 merged_length += src->length; in ntfs_rl_insert() 339 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_insert() 342 dst[marker].length = dst[marker + 1].vcn - dst[marker].vcn; in ntfs_rl_insert() 347 dst[loc].vcn = dst[loc - 1].vcn + dst[loc - 1].length; in ntfs_rl_insert() [all …]
|
/Linux-v4.19/drivers/net/ethernet/netronome/nfp/ |
D | nfp_net_ctrl.c | 64 unsigned int length, offset; in nfp_net_tlv_caps_parse() local 67 length = FIELD_GET(NFP_NET_CFG_TLV_HEADER_LENGTH, hdr); in nfp_net_tlv_caps_parse() 73 if (length % NFP_NET_CFG_TLV_LENGTH_INC) { in nfp_net_tlv_caps_parse() 75 NFP_NET_CFG_TLV_LENGTH_INC, length); in nfp_net_tlv_caps_parse() 78 if (data + length > end) { in nfp_net_tlv_caps_parse() 80 offset, length); in nfp_net_tlv_caps_parse() 91 if (!length) in nfp_net_tlv_caps_parse() 95 length); in nfp_net_tlv_caps_parse() 98 if (length != 4) { in nfp_net_tlv_caps_parse() 101 length); in nfp_net_tlv_caps_parse() [all …]
|
/Linux-v4.19/drivers/infiniband/sw/rxe/ |
D | rxe_mr.c | 54 int mem_check_range(struct rxe_mem *mem, u64 iova, size_t length) in mem_check_range() argument 63 length > mem->length || in mem_check_range() 64 iova > mem->iova + mem->length - length) in mem_check_range() 162 u64 length, u64 iova, int access, struct ib_udata *udata, in rxe_mem_init_user() argument 174 umem = ib_umem_get(pd->ibpd.uobject->context, start, length, access, 0); in rxe_mem_init_user() 199 if (length > 0) { in rxe_mem_init_user() 226 mem->length = length; in rxe_mem_init_user() 274 u64 length; in lookup_iova() local 285 length = mem->map[map_index]->buf[buf_index].size; in lookup_iova() 287 while (offset >= length) { in lookup_iova() [all …]
|
D | rxe_opcode.c | 133 .length = RXE_BTH_BYTES, 143 .length = RXE_BTH_BYTES, 153 .length = RXE_BTH_BYTES, 163 .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, 176 .length = RXE_BTH_BYTES, 187 .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, 199 .length = RXE_BTH_BYTES + RXE_RETH_BYTES, 211 .length = RXE_BTH_BYTES, 221 .length = RXE_BTH_BYTES, 232 .length = RXE_BTH_BYTES + RXE_IMMDT_BYTES, [all …]
|
/Linux-v4.19/drivers/video/fbdev/ |
D | 68328fb.c | 116 u_long length; in get_line_length() local 118 length = xres_virtual * bpp; in get_line_length() 119 length = (length + 31) & ~31; in get_line_length() 120 length >>= 3; in get_line_length() 121 return (length); in get_line_length() 193 var->red.length = 1; in mc68x328fb_check_var() 195 var->green.length = 1; in mc68x328fb_check_var() 197 var->blue.length = 1; in mc68x328fb_check_var() 199 var->transp.length = 0; in mc68x328fb_check_var() 203 var->red.length = 8; in mc68x328fb_check_var() [all …]
|
/Linux-v4.19/drivers/net/ethernet/cisco/enic/ |
D | vnic_vic.c | 40 vp->length = htonl(sizeof(vp->num_tlvs)); in vic_provinfo_alloc() 50 int vic_provinfo_add_tlv(struct vic_provinfo *vp, u16 type, u16 length, in vic_provinfo_add_tlv() argument 58 if (ntohl(vp->length) + offsetof(struct vic_provinfo_tlv, value) + in vic_provinfo_add_tlv() 59 length > VIC_PROVINFO_MAX_TLV_DATA) in vic_provinfo_add_tlv() 63 ntohl(vp->length) - sizeof(vp->num_tlvs)); in vic_provinfo_add_tlv() 66 tlv->length = htons(length); in vic_provinfo_add_tlv() 67 memcpy(tlv->value, value, length); in vic_provinfo_add_tlv() 70 vp->length = htonl(ntohl(vp->length) + in vic_provinfo_add_tlv() 71 offsetof(struct vic_provinfo_tlv, value) + length); in vic_provinfo_add_tlv() 78 return vp ? ntohl(vp->length) + sizeof(*vp) - sizeof(vp->num_tlvs) : 0; in vic_provinfo_size()
|
/Linux-v4.19/arch/s390/pci/ |
D | pci_mmio.c | 36 const void __user *, user_buffer, size_t, length) in SYSCALL_DEFINE3() argument 47 if (length <= 0 || PAGE_SIZE - (mmio_addr & ~PAGE_MASK) < length) in SYSCALL_DEFINE3() 49 if (length > 64) { in SYSCALL_DEFINE3() 50 buf = kmalloc(length, GFP_KERNEL); in SYSCALL_DEFINE3() 65 if (copy_from_user(buf, user_buffer, length)) in SYSCALL_DEFINE3() 68 ret = zpci_memcpy_toio(io_addr, buf, length); in SYSCALL_DEFINE3() 76 void __user *, user_buffer, size_t, length) in SYSCALL_DEFINE3() argument 87 if (length <= 0 || PAGE_SIZE - (mmio_addr & ~PAGE_MASK) < length) in SYSCALL_DEFINE3() 89 if (length > 64) { in SYSCALL_DEFINE3() 90 buf = kmalloc(length, GFP_KERNEL); in SYSCALL_DEFINE3() [all …]
|
/Linux-v4.19/drivers/video/ |
D | hdmi.c | 65 frame->length = HDMI_AVI_INFOFRAME_SIZE; in hdmi_avi_infoframe_init() 89 size_t length; in hdmi_avi_infoframe_pack() local 91 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_avi_infoframe_pack() 93 if (size < length) in hdmi_avi_infoframe_pack() 103 ptr[2] = frame->length; in hdmi_avi_infoframe_pack() 151 hdmi_infoframe_set_checksum(buffer, length); in hdmi_avi_infoframe_pack() 153 return length; in hdmi_avi_infoframe_pack() 172 frame->length = HDMI_SPD_INFOFRAME_SIZE; in hdmi_spd_infoframe_init() 199 size_t length; in hdmi_spd_infoframe_pack() local 201 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_spd_infoframe_pack() [all …]
|