/drivers/gpu/drm/msm/dp/ |
D | dp_debug.c | 34 static int dp_debug_check_buffer_overflow(int rc, int *max_size, int *len) in dp_debug_check_buffer_overflow() argument 36 if (rc >= *max_size) { in dp_debug_check_buffer_overflow() 41 *max_size = SZ_4K - *len; in dp_debug_check_buffer_overflow() 53 u32 max_size = SZ_4K; in dp_debug_read_info() local 69 rc = snprintf(buf + len, max_size, "\tname = %s\n", DEBUG_NAME); in dp_debug_read_info() 70 if (dp_debug_check_buffer_overflow(rc, &max_size, &len)) in dp_debug_read_info() 73 rc = snprintf(buf + len, max_size, in dp_debug_read_info() 76 if (dp_debug_check_buffer_overflow(rc, &max_size, &len)) in dp_debug_read_info() 79 rc = snprintf(buf + len, max_size, in dp_debug_read_info() 82 if (dp_debug_check_buffer_overflow(rc, &max_size, &len)) in dp_debug_read_info() [all …]
|
/drivers/misc/habanalabs/common/ |
D | habanalabs_ioctl.c | 89 u32 size, max_size = args->return_size; in hw_events_info() local 93 if ((!max_size) || (!out)) in hw_events_info() 98 return copy_to_user(out, arr, min(max_size, size)) ? -EFAULT : 0; in hw_events_info() 105 u32 max_size = args->return_size; in dram_usage_info() local 110 if ((!max_size) || (!out)) in dram_usage_info() 122 min((size_t) max_size, sizeof(dram_usage))) ? -EFAULT : 0; in dram_usage_info() 128 u32 max_size = args->return_size; in hw_idle() local 131 if ((!max_size) || (!out)) in hw_idle() 140 min((size_t) max_size, sizeof(hw_idle))) ? -EFAULT : 0; in hw_idle() 211 u32 max_size = args->return_size; in device_utilization() local [all …]
|
D | sysfs.c | 343 size_t max_size) in eeprom_read_handler() argument 353 if (!max_size) in eeprom_read_handler() 356 data = kzalloc(max_size, GFP_KERNEL); in eeprom_read_handler() 360 rc = hdev->asic_funcs->get_eeprom_data(hdev, data, max_size); in eeprom_read_handler() 364 memcpy(buf, data, max_size); in eeprom_read_handler() 369 return max_size; in eeprom_read_handler()
|
D | firmware_if.c | 323 int hl_fw_get_eeprom_data(struct hl_device *hdev, void *data, size_t max_size) in hl_fw_get_eeprom_data() argument 333 max_size, &eeprom_info_dma_addr); in hl_fw_get_eeprom_data() 340 memset(eeprom_info_cpu_addr, 0, max_size); in hl_fw_get_eeprom_data() 345 pkt.data_max_size = cpu_to_le32(max_size); in hl_fw_get_eeprom_data() 358 memcpy(data, eeprom_info_cpu_addr, min((size_t)result, max_size)); in hl_fw_get_eeprom_data() 361 hdev->asic_funcs->cpu_accessible_dma_pool_free(hdev, max_size, in hl_fw_get_eeprom_data()
|
/drivers/acpi/ |
D | custom_method.c | 26 static u32 max_size; in cm_write() local 44 uncopied_bytes = max_size = table.length; in cm_write() 47 buf = kzalloc(max_size, GFP_KERNEL); in cm_write() 55 if ((*ppos > max_size) || in cm_write() 56 (*ppos + count > max_size) || in cm_write()
|
/drivers/platform/chrome/wilco_ec/ |
D | telemetry.c | 157 size_t max_size = offsetof(struct wilco_ec_telem_request, args); in check_telem_request() local 164 max_size += sizeof(rq->args.get_log); in check_telem_request() 167 max_size += sizeof(rq->args.get_version); in check_telem_request() 170 max_size += sizeof(rq->args.get_fan_info); in check_telem_request() 173 max_size += sizeof(rq->args.get_diag_info); in check_telem_request() 176 max_size += sizeof(rq->args.get_temp_info); in check_telem_request() 179 max_size += sizeof(rq->args.get_temp_read); in check_telem_request() 182 max_size += sizeof(rq->args.get_batt_ext_info); in check_telem_request() 188 max_size += sizeof(rq->args.get_batt_ppid_info); in check_telem_request() 194 return (size <= max_size) ? 0 : -EMSGSIZE; in check_telem_request()
|
/drivers/staging/media/atomisp/pci/ |
D | sh_css_version.c | 24 ia_css_get_version(char *version, int max_size) { in ia_css_get_version() argument 32 if (max_size <= (int)strlen(css_version) + (int)strlen(sh_css_get_fw_version()) + 5) in ia_css_get_version() 34 strscpy(version, css_version, max_size); in ia_css_get_version()
|
/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_ioctl.c | 155 unsigned int max_size; in vmw_fill_compat_cap() local 160 max_size = (size - pair_offset) / sizeof(SVGA3dCapPair); in vmw_fill_compat_cap() 162 if (max_size > SVGA3D_DEVCAP_MAX) in vmw_fill_compat_cap() 163 max_size = SVGA3D_DEVCAP_MAX; in vmw_fill_compat_cap() 166 (pair_offset + max_size * sizeof(SVGA3dCapPair)) / sizeof(u32); in vmw_fill_compat_cap() 170 for (i = 0; i < max_size; ++i) { in vmw_fill_compat_cap() 196 if (unlikely(arg->pad64 != 0 || arg->max_size == 0)) { in vmw_get_cap_3d_ioctl() 209 if (arg->max_size < size) in vmw_get_cap_3d_ioctl() 210 size = arg->max_size; in vmw_get_cap_3d_ioctl()
|
/drivers/net/ethernet/mellanox/mlx5/core/ |
D | rl.c | 120 for (i = 0; i < table->max_size; i++) { in find_rl_entry() 196 table->max_size); in mlx5_rl_add_rate_raw() 307 table->max_size = 0; in mlx5_init_rl_table() 312 table->max_size = MLX5_CAP_QOS(dev, packet_pacing_rate_table_size) - 1; in mlx5_init_rl_table() 316 table->rl_entry = kcalloc(table->max_size, sizeof(struct mlx5_rl_entry), in mlx5_init_rl_table() 324 for (i = 0; i < table->max_size; i++) in mlx5_init_rl_table() 329 table->max_size, in mlx5_init_rl_table() 342 for (i = 0; i < table->max_size; i++) in mlx5_cleanup_rl_table()
|
/drivers/net/ethernet/mellanox/mlx5/core/fpga/ |
D | sdk.c | 64 size_t max_size = MLX5_FPGA_ACCESS_REG_SIZE_MAX; in mlx5_fpga_mem_read_i2c() local 76 actual_size = min(max_size, (size - bytes_done)); in mlx5_fpga_mem_read_i2c() 96 size_t max_size = MLX5_FPGA_ACCESS_REG_SIZE_MAX; in mlx5_fpga_mem_write_i2c() local 108 actual_size = min(max_size, (size - bytes_done)); in mlx5_fpga_mem_write_i2c()
|
/drivers/net/wireless/ath/ath11k/ |
D | hal.c | 19 .max_size = HAL_REO_REO2SW1_RING_BASE_MSB_RING_SIZE, 31 .max_size = HAL_REO_REO2TCL_RING_BASE_MSB_RING_SIZE, 39 .max_size = HAL_REO_SW2REO_RING_BASE_MSB_RING_SIZE, 48 .max_size = HAL_REO_CMD_RING_BASE_MSB_RING_SIZE, 57 .max_size = HAL_REO_STATUS_RING_BASE_MSB_RING_SIZE, 66 .max_size = HAL_SW2TCL1_RING_BASE_MSB_RING_SIZE, 75 .max_size = HAL_SW2TCL1_CMD_RING_BASE_MSB_RING_SIZE, 84 .max_size = HAL_TCL_STATUS_RING_BASE_MSB_RING_SIZE, 103 .max_size = HAL_CE_SRC_RING_BASE_MSB_RING_SIZE, 122 .max_size = HAL_CE_DST_RING_BASE_MSB_RING_SIZE, [all …]
|
/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | port.c | 181 u32 max_size; in mlx5e_port_ptys2speed() local 184 mlx5e_port_get_speed_arr(mdev, &table, &max_size, force_legacy); in mlx5e_port_ptys2speed() 185 i = find_first_bit(&temp, max_size); in mlx5e_port_ptys2speed() 186 if (i < max_size) in mlx5e_port_ptys2speed() 221 u32 max_size; in mlx5e_port_max_linkspeed() local 231 mlx5e_port_get_speed_arr(mdev, &table, &max_size, false); in mlx5e_port_max_linkspeed() 232 for (i = 0; i < max_size; ++i) in mlx5e_port_max_linkspeed() 245 u32 max_size; in mlx5e_port_speed2linkmodes() local 248 mlx5e_port_get_speed_arr(mdev, &table, &max_size, force_legacy); in mlx5e_port_speed2linkmodes() 249 for (i = 0; i < max_size; ++i) { in mlx5e_port_speed2linkmodes()
|
/drivers/staging/most/dim2/ |
D | hal.c | 445 u16 const max_size = ((u16)CDT3_BD_ISOC_MASK + 1u) / ISOC_DBR_FACTOR; in check_packet_length() local 450 if (packet_length > max_size) in check_packet_length() 462 u16 const max_size = ((u16)CDT3_BD_MASK + 1u) >> bd_factor; in check_bytes_per_frame() local 467 if (bytes_per_frame > max_size) in check_bytes_per_frame() 475 u16 const max_size = (u16)ADT1_CTRL_ASYNC_BD_MASK + 1u; in dim_norm_ctrl_async_buffer_size() local 477 if (buf_size > max_size) in dim_norm_ctrl_async_buffer_size() 478 return max_size; in dim_norm_ctrl_async_buffer_size() 486 u16 const max_size = (u16)ADT1_ISOC_SYNC_BD_MASK + 1u; in norm_isoc_buffer_size() local 488 if (buf_size > max_size) in norm_isoc_buffer_size() 489 buf_size = max_size; in norm_isoc_buffer_size() [all …]
|
/drivers/soundwire/ |
D | generic_bandwidth_allocation.c | 27 unsigned int max_size; member 221 if (group->count >= group->max_size) { in sdw_add_element_group_count() 224 group->max_size += 1; in sdw_add_element_group_count() 226 (sizeof(int) * group->max_size), in sdw_add_element_group_count() 247 group->max_size = SDW_STRM_RATE_GROUPING; in sdw_get_group_count() 248 group->rates = kcalloc(group->max_size, sizeof(int), GFP_KERNEL); in sdw_get_group_count()
|
/drivers/net/ethernet/netronome/nfp/nfpcore/ |
D | nfp_nsp.c | 495 unsigned int max_size, unsigned int chunk_order, in nfp_nsp_command_buf_dma_sg() argument 514 nseg = DIV_ROUND_UP(max_size, chunk_size); in nfp_nsp_command_buf_dma_sg() 530 chunks[i].len = min_t(u64, chunk_size, max_size - off); in nfp_nsp_command_buf_dma_sg() 617 arg->arg.code, ret, max_size, chunk_order); in nfp_nsp_command_buf_dma_sg() 624 unsigned int max_size, unsigned int dma_order) in nfp_nsp_command_buf_dma() argument 632 buf_order = order_base_2(roundup_pow_of_two(max_size)); in nfp_nsp_command_buf_dma() 652 return nfp_nsp_command_buf_dma_sg(nsp, arg, max_size, chunk_order, in nfp_nsp_command_buf_dma() 659 unsigned int dma_order, def_size, max_size; in nfp_nsp_command_buf() local 681 max_size = max(arg->in_size, arg->out_size); in nfp_nsp_command_buf() 685 if (def_size >= max_size) { in nfp_nsp_command_buf() [all …]
|
/drivers/gpu/drm/ttm/ |
D | ttm_page_alloc.c | 89 unsigned max_size; member 168 m->options.max_size = val; in ttm_pool_store() 195 val = m->options.max_size; in ttm_pool_show() 760 unsigned max_size, n2free; in ttm_put_pages() local 785 max_size = _manager->options.max_size; in ttm_put_pages() 786 max_size /= HPAGE_PMD_NR; in ttm_put_pages() 787 if (huge->npages > max_size) in ttm_put_pages() 788 n2free = huge->npages - max_size; in ttm_put_pages() 810 if (pool->npages > _manager->options.max_size) { in ttm_put_pages() 811 npages = pool->npages - _manager->options.max_size; in ttm_put_pages() [all …]
|
/drivers/firmware/efi/ |
D | capsule.c | 90 u64 max_size; in efi_capsule_supported() local 99 status = efi.query_capsule_caps(cap_list, 1, &max_size, reset); in efi_capsule_supported() 103 if (size > max_size) in efi_capsule_supported()
|
/drivers/crypto/virtio/ |
D | virtio_crypto_core.c | 346 u64 max_size = 0; in virtcrypto_probe() local 390 max_size, &max_size); in virtcrypto_probe() 426 vcrypto->max_size = max_size; in virtcrypto_probe() 441 vcrypto->max_size); in virtcrypto_probe()
|
/drivers/gpu/drm/i915/display/ |
D | intel_fbdev.c | 319 unsigned int max_size = 0; in intel_fbdev_init_bios() local 334 if (obj->base.size > max_size) { in intel_fbdev_init_bios() 339 max_size = obj->base.size; in intel_fbdev_init_bios() 392 if (cur_size > max_size) { in intel_fbdev_init_bios() 396 cur_size, max_size); in intel_fbdev_init_bios() 404 max_size, cur_size); in intel_fbdev_init_bios()
|
/drivers/regulator/ |
D | da9211-regulator.c | 171 int i, max_size; in da9211_set_current_limit() local 177 max_size = ARRAY_SIZE(da9211_current_limits)-1; in da9211_set_current_limit() 181 max_size = ARRAY_SIZE(da9213_current_limits)-1; in da9211_set_current_limit() 185 max_size = ARRAY_SIZE(da9215_current_limits)-1; in da9211_set_current_limit() 192 for (i = max_size; i >= 0; i--) { in da9211_set_current_limit()
|
/drivers/scsi/fnic/ |
D | fnic_trace.c | 804 int max_size = fnic_fc_trace_max_pages * PAGE_SIZE * 3; in copy_and_format_trace_data() local 814 max_size - len, in copy_and_format_trace_data() 827 max_size - len, "%c", fc_trace[j]); in copy_and_format_trace_data() 830 max_size - len, "%02x", fc_trace[j] & 0xff); in copy_and_format_trace_data() 832 max_size - len, " "); in copy_and_format_trace_data() 838 + len, max_size - len, in copy_and_format_trace_data() 845 max_size - len, "\n"); in copy_and_format_trace_data()
|
/drivers/iio/buffer/ |
D | industrialio-buffer-dmaengine.c | 39 size_t max_size; member 69 block->bytes_used = min(block->size, dmaengine_buffer->max_size); in iio_dmaengine_buffer_submit_block() 199 dmaengine_buffer->max_size = dma_get_max_seg_size(chan->device->dev); in iio_dmaengine_buffer_alloc()
|
/drivers/net/ethernet/intel/ice/ |
D | ice_nvm.c | 530 u32 min_size = 0, max_size = ICE_AQC_NVM_MAX_OFFSET + 1; in ice_discover_flash_size() local 537 while ((max_size - min_size) > 1) { in ice_discover_flash_size() 538 u32 offset = (max_size + min_size) / 2; in ice_discover_flash_size() 549 max_size = offset; in ice_discover_flash_size() 562 "Predicted flash size is %u bytes\n", max_size); in ice_discover_flash_size() 564 hw->nvm.flash_size = max_size; in ice_discover_flash_size()
|
/drivers/firmware/efi/test/ |
D | efi_test.c | 564 u64 max_storage, remaining, max_size; in efi_runtime_query_variableinfo() local 573 &max_storage, &remaining, &max_size); in efi_runtime_query_variableinfo() 589 if (put_user(max_size, queryvariableinfo.maximum_variable_size)) in efi_runtime_query_variableinfo() 601 u64 max_size; in efi_runtime_query_capsulecaps() local 641 &max_size, &reset_type); in efi_runtime_query_capsulecaps() 653 if (put_user(max_size, qcaps.maximum_capsule_size)) { in efi_runtime_query_capsulecaps()
|
/drivers/staging/greybus/ |
D | authentication.c | 108 size_t max_size = gb_operation_get_payload_size_max(connection); in cap_get_ims_certificate() local 114 sizeof(*request), max_size, in cap_get_ims_certificate() 147 size_t max_size = gb_operation_get_payload_size_max(connection); in cap_authenticate() local 152 sizeof(*request), max_size, in cap_authenticate()
|