Home
last modified time | relevance | path

Searched refs:expected_size (Results 1 – 25 of 26) sorted by relevance

12

/linux/drivers/greybus/
H A Dmanifest.c104 size_t expected_size; in identify_descriptor() local
120 expected_size = sizeof(*desc_header); in identify_descriptor()
124 expected_size += sizeof(struct greybus_descriptor_string); in identify_descriptor()
125 expected_size += desc->string.length; in identify_descriptor()
128 expected_size = ALIGN(expected_size, 4); in identify_descriptor()
131 expected_size += sizeof(struct greybus_descriptor_interface); in identify_descriptor()
134 expected_size += sizeof(struct greybus_descriptor_bundle); in identify_descriptor()
137 expected_size += sizeof(struct greybus_descriptor_cport); in identify_descriptor()
146 if (desc_size < expected_size) { in identify_descriptor()
149 desc_size, expected_size); in identify_descriptor()
[all …]
/linux/lib/
H A Dfortify_kunit.c202 #define TEST_kmalloc(checker, expected_size, alloc_size) do { \ argument
207 checker(expected_size, kmalloc(alloc_size, gfp), \
209 checker(expected_size, \
212 checker(expected_size, kzalloc(alloc_size, gfp), \
214 checker(expected_size, \
217 checker(expected_size, kcalloc(1, alloc_size, gfp), \
219 checker(expected_size, kcalloc(alloc_size, 1, gfp), \
221 checker(expected_size, \
224 checker(expected_size, \
227 checker(expected_size, kmalloc_array(1, alloc_size, gfp), \
[all …]
/linux/lib/pldmfw/
H A Dpldmfw.c67 size_t expected_size = offset + length; in pldm_check_fw_space() local
70 if (data->fw->size < expected_size) { in pldm_check_fw_space()
72 data->fw->size, expected_size); in pldm_check_fw_space()
206 u16 expected_size; in pldm_check_desc_tlv_len() local
213 expected_size = 2; in pldm_check_desc_tlv_len()
216 expected_size = 1; in pldm_check_desc_tlv_len()
219 expected_size = 3; in pldm_check_desc_tlv_len()
225 expected_size = 4; in pldm_check_desc_tlv_len()
228 expected_size = 16; in pldm_check_desc_tlv_len()
238 if (size != expected_size) { in pldm_check_desc_tlv_len()
[all …]
/linux/drivers/net/wireless/intel/iwlwifi/fw/
H A Dacpi.c108 size_t expected_size) in iwl_acpi_get_dsm_integer() argument
126 if (WARN_ON_ONCE(expected_size > sizeof(le_value))) in iwl_acpi_get_dsm_integer()
130 if (obj->buffer.length != expected_size) in iwl_acpi_get_dsm_integer()
137 min_t(size_t, expected_size, (size_t)obj->buffer.length)); in iwl_acpi_get_dsm_integer()
163 size_t expected_size; in iwl_acpi_get_dsm() local
172 expected_size = acpi_dsm_size[func]; in iwl_acpi_get_dsm()
175 if (expected_size != sizeof(u8) && expected_size != sizeof(u32)) in iwl_acpi_get_dsm()
179 &iwl_guid, &tmp, expected_size); in iwl_acpi_get_dsm()
183 if ((expected_size == sizeof(u8) && tmp != (u8)tmp) || in iwl_acpi_get_dsm()
184 (expected_size == sizeof(u32) && tmp != (u32)tmp)) in iwl_acpi_get_dsm()
H A Duefi.c83 unsigned int expected_size, in iwl_uefi_get_verified_variable() argument
99 if (var_size < expected_size) { in iwl_uefi_get_verified_variable()
/linux/tools/testing/selftests/arm64/fp/
H A Dsve-ptrace.c518 size_t expected_size; in ptrace_set_fpsimd_get_sve_data() local
556 expected_size = SVE_PT_FPSIMD_SIZE(vq, SVE_PT_REGS_FPSIMD); in ptrace_set_fpsimd_get_sve_data()
557 if (read_sve_size < expected_size) { in ptrace_set_fpsimd_get_sve_data()
559 read_sve_size, expected_size); in ptrace_set_fpsimd_get_sve_data()
572 expected_size = SVE_PT_SVE_SIZE(vq, SVE_PT_REGS_SVE); in ptrace_set_fpsimd_get_sve_data()
573 if (read_sve_size < expected_size) { in ptrace_set_fpsimd_get_sve_data()
575 read_sve_size, expected_size); in ptrace_set_fpsimd_get_sve_data()
/linux/drivers/input/touchscreen/
H A Dgoodix_fwupload.c47 size_t expected_size; in goodix_firmware_verify() local
52 expected_size = GOODIX_FW_HEADER_LENGTH + 4 * GOODIX_FW_SECTION_LENGTH + in goodix_firmware_verify()
54 if (fw->size != expected_size) { in goodix_firmware_verify()
56 expected_size, fw->size); in goodix_firmware_verify()
/linux/drivers/platform/x86/intel/ifs/
H A Dload.c397 unsigned int expected_size; in ifs_load_firmware() local
412 expected_size = ((struct microcode_header_intel *)fw->data)->totalsize; in ifs_load_firmware()
413 if (fw->size != expected_size) { in ifs_load_firmware()
415 expected_size, fw->size); in ifs_load_firmware()
/linux/drivers/net/wireless/intel/iwlwifi/mvm/
H A Drx.c838 u32 expected_size) in iwl_mvm_verify_stats_len() argument
842 if (WARN_ONCE(iwl_rx_packet_payload_len(pkt) < expected_size, in iwl_mvm_verify_stats_len()
844 iwl_rx_packet_payload_len(pkt), expected_size)) in iwl_mvm_verify_stats_len()
856 if (WARN_ONCE(le16_to_cpu(hdr->size) != expected_size, in iwl_mvm_verify_stats_len()
858 le16_to_cpu(hdr->size), expected_size)) in iwl_mvm_verify_stats_len()
1187 int expected_size; in iwl_mvm_handle_rx_statistics() local
1204 expected_size = sizeof(struct iwl_notif_statistics_v11); in iwl_mvm_handle_rx_statistics()
1206 expected_size = sizeof(struct iwl_notif_statistics_v10); in iwl_mvm_handle_rx_statistics()
1208 expected_size = sizeof(struct iwl_notif_statistics); in iwl_mvm_handle_rx_statistics()
1211 if (WARN_ONCE(iwl_rx_packet_payload_len(pkt) != expected_size, in iwl_mvm_handle_rx_statistics()
/linux/sound/soc/sof/
H A Dipc3-control.c559 size_t expected_size; in sof_ipc3_control_update() local
629 expected_size = sizeof(struct sof_ipc_ctrl_data); in sof_ipc3_control_update()
633 expected_size += cdata->num_elems * in sof_ipc3_control_update()
638 expected_size += cdata->num_elems + sizeof(struct sof_abi_hdr); in sof_ipc3_control_update()
644 if (cdata->rhdr.hdr.size != expected_size) { in sof_ipc3_control_update()
/linux/drivers/gpu/drm/
H A Ddrm_property.c774 ssize_t expected_size, in drm_property_replace_blob_from_id() argument
788 if (expected_size > 0 && in drm_property_replace_blob_from_id()
789 new_blob->length != expected_size) { in drm_property_replace_blob_from_id()
792 new_blob->base.id, new_blob->length, expected_size); in drm_property_replace_blob_from_id()
/linux/drivers/gpu/drm/amd/amdkfd/
H A Dkfd_queue.c197 u64 expected_size) in kfd_queue_buffer_get() argument
204 size = expected_size >> AMDGPU_GPU_PAGE_SHIFT; in kfd_queue_buffer_get()
213 expected_size, mapping->start << AMDGPU_GPU_PAGE_SHIFT, in kfd_queue_buffer_get()
H A Dkfd_priv.h1308 u64 expected_size);
/linux/include/drm/
H A Ddrm_property.h285 ssize_t expected_size,
/linux/drivers/scsi/megaraid/
H A Dmegaraid_sas_fp.c312 u32 expected_size; in MR_ValidateMapInfo() local
325 expected_size = sizeof(struct MR_DRV_RAID_MAP_ALL); in MR_ValidateMapInfo()
327 expected_size = sizeof(struct MR_FW_RAID_MAP_EXT); in MR_ValidateMapInfo()
329 expected_size = struct_size_t(struct MR_FW_RAID_MAP, in MR_ValidateMapInfo()
333 if (le32_to_cpu(pDrvRaidMap->totalSize) != expected_size) { in MR_ValidateMapInfo()
337 (unsigned int)expected_size); in MR_ValidateMapInfo()
/linux/drivers/usb/class/
H A Dcdc-acm.c376 unsigned int expected_size, copy_size, alloc_size; in acm_ctrl_irq() local
405 expected_size = sizeof(struct usb_cdc_notification) + in acm_ctrl_irq()
408 if (current_size < expected_size) { in acm_ctrl_irq()
410 if (acm->nb_size < expected_size) { in acm_ctrl_irq()
412 alloc_size = roundup_pow_of_two(expected_size); in acm_ctrl_irq()
427 expected_size - acm->nb_index); in acm_ctrl_irq()
435 if (current_size >= expected_size) { in acm_ctrl_irq()
/linux/drivers/gpu/drm/i915/display/
H A Dintel_bios.c2768 int expected_size; in child_device_size_valid() local
2770 expected_size = child_device_expected_size(display->vbt.version); in child_device_size_valid()
2771 if (expected_size < 0) { in child_device_size_valid()
2772 expected_size = sizeof(struct child_device_config); in child_device_size_valid()
2775 display->vbt.version, expected_size); in child_device_size_valid()
2779 if (size != expected_size) in child_device_size_valid()
2782 size, expected_size, display->vbt.version); in child_device_size_valid()
/linux/drivers/net/wireless/ath/wil6210/
H A Dwmi.c1480 size_t stats_size, record_size, expected_size; in wmi_link_stats_parse() local
1501 expected_size = sizeof(struct wmi_link_stats_basic); in wmi_link_stats_parse()
1502 if (stats_size < expected_size) { in wmi_link_stats_parse()
1504 stats_size, expected_size); in wmi_link_stats_parse()
1522 expected_size = sizeof(struct wmi_link_stats_global); in wmi_link_stats_parse()
1525 stats_size, expected_size); in wmi_link_stats_parse()
/linux/include/linux/
H A Dbtf.h222 u32 expected_offset, u32 expected_size);
/linux/kernel/bpf/
H A Dsyscall.c85 size_t expected_size, in bpf_check_uarg_tail_zero() argument
93 if (actual_size <= expected_size) in bpf_check_uarg_tail_zero()
97 res = memchr_inv(uaddr.kernel + expected_size, 0, in bpf_check_uarg_tail_zero()
98 actual_size - expected_size) == NULL; in bpf_check_uarg_tail_zero()
100 res = check_zeroed_user(uaddr.user + expected_size, in bpf_check_uarg_tail_zero()
101 actual_size - expected_size); in bpf_check_uarg_tail_zero()
H A Dbtf.c892 u32 expected_offset, u32 expected_size) in btf_member_is_reg_int() argument
914 BITS_ROUNDUP_BYTES(nr_bits) == expected_size; in btf_member_is_reg_int()
921 BITS_ROUNDUP_BYTES(nr_bits) != expected_size) in btf_member_is_reg_int()
3610 u32 off, u32 expected_size, in btf_find_field_one() argument
3638 if (expected_size && expected_size != sz * nelems) in btf_find_field_one()
3650 if (expected_size && expected_size != sz * nelems) in btf_find_field_one()
H A Dverifier.c16796 u32 i, s, nr_linfo, ncopy, expected_size, rec_size, prev_offset = 0; in check_btf_line() local
16830 expected_size = sizeof(struct bpf_line_info); in check_btf_line()
16831 ncopy = min_t(u32, expected_size, rec_size); in check_btf_line()
16833 err = bpf_check_uarg_tail_zero(ulinfo, expected_size, rec_size); in check_btf_line()
16839 &expected_size, sizeof(expected_size))) in check_btf_line()
16924 u32 i, nr_core_relo, ncopy, expected_size, rec_size; in check_core_relo() local
16948 expected_size = sizeof(struct bpf_core_relo); in check_core_relo()
16949 ncopy = min_t(u32, expected_size, rec_size); in check_core_relo()
16956 err = bpf_check_uarg_tail_zero(u_core_relo, expected_size, rec_size); in check_core_relo()
16962 &expected_size, sizeof(expected_size))) in check_core_relo()
/linux/net/packet/
H A Daf_packet.c4640 unsigned long size, expected_size; in packet_mmap() local
4651 expected_size = 0; in packet_mmap()
4654 expected_size += rb->pg_vec_len in packet_mmap()
4660 if (expected_size == 0) in packet_mmap()
4664 if (size != expected_size) in packet_mmap()
/linux/fs/btrfs/
H A Dextent-tree.c2358 u32 expected_size; in check_committed_ref() local
2392 expected_size = sizeof(*ei) + btrfs_extent_inline_ref_size(BTRFS_EXTENT_DATA_REF_KEY); in check_committed_ref()
2402 expected_size += btrfs_extent_inline_ref_size(BTRFS_EXTENT_OWNER_REF_KEY); in check_committed_ref()
2407 if (item_size != expected_size) in check_committed_ref()
/linux/net/bluetooth/
H A Dmgmt.c5379 size_t expected_size = sizeof(*cp); in add_adv_patterns_monitor() local
5388 expected_size += cp->pattern_count * sizeof(struct mgmt_adv_pattern); in add_adv_patterns_monitor()
5389 if (len != expected_size) { in add_adv_patterns_monitor()
5416 size_t expected_size = sizeof(*cp); in add_adv_patterns_monitor_rssi() local
5425 expected_size += cp->pattern_count * sizeof(struct mgmt_adv_pattern); in add_adv_patterns_monitor_rssi()
5426 if (len != expected_size) { in add_adv_patterns_monitor_rssi()

12