Home
last modified time | relevance | path

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

/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/tests/
H A Dfortify_kunit.c219 #define TEST_kmalloc(checker, expected_size, alloc_size) do { \ argument
224 checker(expected_size, kmalloc(alloc_size, gfp), \
226 checker(expected_size, \
229 checker(expected_size, kzalloc(alloc_size, gfp), \
231 checker(expected_size, \
234 checker(expected_size, kcalloc(1, alloc_size, gfp), \
236 checker(expected_size, kcalloc(alloc_size, 1, gfp), \
238 checker(expected_size, \
241 checker(expected_size, \
244 checker(expected_size, kmalloc_array(1, alloc_size, gfp), \
[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()
132 if (obj->buffer.length != expected_size) in iwl_acpi_get_dsm_integer()
139 min_t(size_t, expected_size, (size_t)obj->buffer.length)); in iwl_acpi_get_dsm_integer()
166 size_t expected_size; in iwl_acpi_get_dsm() local
175 expected_size = acpi_dsm_size[func]; in iwl_acpi_get_dsm()
178 if (expected_size != sizeof(u8) && expected_size != sizeof(u32)) in iwl_acpi_get_dsm()
205 &iwl_guid, &tmp, expected_size); in iwl_acpi_get_dsm()
209 if ((expected_size == sizeof(u8) && tmp != (u8)tmp) || in iwl_acpi_get_dsm()
210 (expected_size == sizeof(u32) && tmp != (u32)tmp)) in iwl_acpi_get_dsm()
H A Duefi.c87 unsigned int expected_size, in iwl_uefi_get_verified_variable_guid() argument
102 if (var_size < expected_size) { in iwl_uefi_get_verified_variable_guid()
122 unsigned int expected_size, in iwl_uefi_get_verified_variable() argument
127 expected_size, size); in iwl_uefi_get_verified_variable()
/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/tools/testing/selftests/arm64/fp/
H A Dsve-ptrace.c642 size_t expected_size; in ptrace_set_fpsimd_get_sve_data() local
680 expected_size = SVE_PT_FPSIMD_SIZE(vq, SVE_PT_REGS_FPSIMD); in ptrace_set_fpsimd_get_sve_data()
681 if (read_sve_size < expected_size) { in ptrace_set_fpsimd_get_sve_data()
683 read_sve_size, expected_size); in ptrace_set_fpsimd_get_sve_data()
696 expected_size = SVE_PT_SVE_SIZE(vq, SVE_PT_REGS_SVE); in ptrace_set_fpsimd_get_sve_data()
697 if (read_sve_size < expected_size) { in ptrace_set_fpsimd_get_sve_data()
699 read_sve_size, expected_size); in ptrace_set_fpsimd_get_sve_data()
/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()
/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/include/drm/
H A Ddrm_property.h285 ssize_t expected_size,
/linux/drivers/usb/class/
H A Dcdc-acm.c376 unsigned int expected_size, copy_size, alloc_size; in acm_ctrl_irq() local
416 expected_size = sizeof(struct usb_cdc_notification) + in acm_ctrl_irq()
419 if (acm->nb_index != 0 || current_size < expected_size) { in acm_ctrl_irq()
421 if (acm->nb_size < expected_size) { in acm_ctrl_irq()
423 alloc_size = roundup_pow_of_two(expected_size); in acm_ctrl_irq()
438 expected_size - acm->nb_index); in acm_ctrl_irq()
446 if (current_size >= expected_size) { in acm_ctrl_irq()
/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/kernel/bpf/
H A Dsyscall.c91 size_t expected_size, in bpf_check_uarg_tail_zero() argument
99 if (actual_size <= expected_size) in bpf_check_uarg_tail_zero()
103 res = memchr_inv(uaddr.kernel + expected_size, 0, in bpf_check_uarg_tail_zero()
104 actual_size - expected_size) == NULL; in bpf_check_uarg_tail_zero()
106 res = check_zeroed_user(uaddr.user + expected_size, in bpf_check_uarg_tail_zero()
107 actual_size - expected_size); in bpf_check_uarg_tail_zero()
H A Dverifier.c18662 u32 i, s, nr_linfo, ncopy, expected_size, rec_size, prev_offset = 0; in check_btf_line() local
18696 expected_size = sizeof(struct bpf_line_info); in check_btf_line()
18697 ncopy = min_t(u32, expected_size, rec_size); in check_btf_line()
18699 err = bpf_check_uarg_tail_zero(ulinfo, expected_size, rec_size); in check_btf_line()
18705 &expected_size, sizeof(expected_size))) in check_btf_line()
18790 u32 i, nr_core_relo, ncopy, expected_size, rec_size; in check_core_relo() local
18814 expected_size = sizeof(struct bpf_core_relo); in check_core_relo()
18815 ncopy = min_t(u32, expected_size, rec_size); in check_core_relo()
18822 err = bpf_check_uarg_tail_zero(u_core_relo, expected_size, rec_size); in check_core_relo()
18828 &expected_size, sizeof(expected_size))) in check_core_relo()
/linux/net/bluetooth/
H A Dmgmt.c5513 size_t expected_size = sizeof(*cp); in add_adv_patterns_monitor() local
5522 expected_size += cp->pattern_count * sizeof(struct mgmt_adv_pattern); in add_adv_patterns_monitor()
5523 if (len != expected_size) { in add_adv_patterns_monitor()
5550 size_t expected_size = sizeof(*cp); in add_adv_patterns_monitor_rssi() local
5559 expected_size += cp->pattern_count * sizeof(struct mgmt_adv_pattern); in add_adv_patterns_monitor_rssi()
5560 if (len != expected_size) { in add_adv_patterns_monitor_rssi()