/drivers/accel/habanalabs/common/ |
D | habanalabs_ioctl.c | 119 u32 size, max_size = args->return_size; in hw_events_info() local 123 if ((!max_size) || (!out)) in hw_events_info() 132 return copy_to_user(out, arr, min(max_size, size)) ? -EFAULT : 0; in hw_events_info() 137 u32 max_size = args->return_size; in events_info() local 141 if ((max_size < sizeof(u64)) || (!out)) in events_info() 156 u32 max_size = args->return_size; in dram_usage_info() local 161 if ((!max_size) || (!out)) in dram_usage_info() 173 min((size_t) max_size, sizeof(dram_usage))) ? -EFAULT : 0; in dram_usage_info() 179 u32 max_size = args->return_size; in hw_idle() local 182 if ((!max_size) || (!out)) in hw_idle() [all …]
|
D | sysfs.c | 352 size_t max_size) in eeprom_read_handler() argument 362 if (!max_size) in eeprom_read_handler() 365 data = kzalloc(max_size, GFP_KERNEL); in eeprom_read_handler() 369 rc = hdev->asic_funcs->get_eeprom_data(hdev, data, max_size); in eeprom_read_handler() 373 memcpy(buf, data, max_size); in eeprom_read_handler() 378 return max_size; in eeprom_read_handler()
|
/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_devcaps.c | 62 unsigned int max_size; in vmw_fill_compat_cap() local 67 max_size = (size - pair_offset) / sizeof(SVGA3dFifoCapPair); in vmw_fill_compat_cap() 69 if (max_size > SVGA3D_DEVCAP_MAX) in vmw_fill_compat_cap() 70 max_size = SVGA3D_DEVCAP_MAX; in vmw_fill_compat_cap() 73 (pair_offset + max_size * sizeof(SVGA3dFifoCapPair)) / sizeof(u32); in vmw_fill_compat_cap() 76 for (i = 0; i < max_size; ++i) { in vmw_fill_compat_cap()
|
/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 | 156 size_t max_size = offsetof(struct wilco_ec_telem_request, args); in check_telem_request() local 163 max_size += sizeof(rq->args.get_log); in check_telem_request() 166 max_size += sizeof(rq->args.get_version); in check_telem_request() 169 max_size += sizeof(rq->args.get_fan_info); in check_telem_request() 172 max_size += sizeof(rq->args.get_diag_info); in check_telem_request() 175 max_size += sizeof(rq->args.get_temp_info); in check_telem_request() 178 max_size += sizeof(rq->args.get_temp_read); in check_telem_request() 181 max_size += sizeof(rq->args.get_batt_ext_info); in check_telem_request() 187 max_size += sizeof(rq->args.get_batt_ppid_info); in check_telem_request() 193 return (size <= max_size) ? 0 : -EMSGSIZE; in check_telem_request()
|
/drivers/base/regmap/ |
D | regmap-spi.c | 115 size_t max_size = spi_max_transfer_size(spi); in regmap_get_spi_bus() local 119 if (max_size != SIZE_MAX) { in regmap_get_spi_bus() 127 if (max_size + reg_reserve_size > max_msg_size) in regmap_get_spi_bus() 128 max_size -= reg_reserve_size; in regmap_get_spi_bus() 131 bus->max_raw_read = max_size; in regmap_get_spi_bus() 132 bus->max_raw_write = max_size; in regmap_get_spi_bus()
|
/drivers/net/ethernet/mellanox/mlx5/core/ |
D | rl.c | 122 for (i = 0; i < table->max_size; i++) { in find_rl_entry() 188 table->rl_entry = kcalloc(table->max_size, sizeof(struct mlx5_rl_entry), in mlx5_rl_table_get() 196 for (i = 0; i < table->max_size; i++) in mlx5_rl_table_get() 221 for (i = 0; i < table->max_size; i++) in mlx5_rl_table_free() 248 if (!table->max_size) in mlx5_rl_add_rate_raw() 266 table->max_size); in mlx5_rl_add_rate_raw() 370 table->max_size = 0; in mlx5_init_rl_table() 377 table->max_size = MLX5_CAP_QOS(dev, packet_pacing_rate_table_size) - 1; in mlx5_init_rl_table() 382 table->max_size, in mlx5_init_rl_table()
|
/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 33 if (max_size <= (int)strlen(css_version) + (int)strlen(sh_css_get_fw_version()) + 5) in ia_css_get_version() 35 strscpy(version, css_version, max_size); in ia_css_get_version()
|
/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 | 20 .max_size = HAL_REO_REO2SW1_RING_BASE_MSB_RING_SIZE, 32 .max_size = HAL_REO_REO2TCL_RING_BASE_MSB_RING_SIZE, 40 .max_size = HAL_REO_SW2REO_RING_BASE_MSB_RING_SIZE, 49 .max_size = HAL_REO_CMD_RING_BASE_MSB_RING_SIZE, 58 .max_size = HAL_REO_STATUS_RING_BASE_MSB_RING_SIZE, 67 .max_size = HAL_SW2TCL1_RING_BASE_MSB_RING_SIZE, 76 .max_size = HAL_SW2TCL1_CMD_RING_BASE_MSB_RING_SIZE, 85 .max_size = HAL_TCL_STATUS_RING_BASE_MSB_RING_SIZE, 93 .max_size = HAL_CE_SRC_RING_BASE_MSB_RING_SIZE, 101 .max_size = HAL_CE_DST_RING_BASE_MSB_RING_SIZE, [all …]
|
/drivers/staging/most/dim2/ |
D | hal.c | 444 u16 const max_size = ((u16)CDT3_BD_ISOC_MASK + 1u) / ISOC_DBR_FACTOR; in check_packet_length() local 449 if (packet_length > max_size) in check_packet_length() 461 u16 const max_size = ((u16)CDT3_BD_MASK + 1u) >> bd_factor; in check_bytes_per_frame() local 466 if (bytes_per_frame > max_size) in check_bytes_per_frame() 474 u16 const max_size = (u16)ADT1_CTRL_ASYNC_BD_MASK + 1u; in dim_norm_ctrl_async_buffer_size() local 476 if (buf_size > max_size) in dim_norm_ctrl_async_buffer_size() 477 return max_size; in dim_norm_ctrl_async_buffer_size() 485 u16 const max_size = (u16)ADT1_ISOC_SYNC_BD_MASK + 1u; in norm_isoc_buffer_size() local 487 if (buf_size > max_size) in norm_isoc_buffer_size() 488 buf_size = max_size; in norm_isoc_buffer_size() [all …]
|
/drivers/gpio/ |
D | gpiolib-swnode.c | 21 size_t max_size) in swnode_format_propname() argument 29 snprintf(propname, max_size, "%s-gpios", con_id); in swnode_format_propname() 31 strscpy(propname, "gpios", max_size); in swnode_format_propname()
|
/drivers/soundwire/ |
D | generic_bandwidth_allocation.c | 28 unsigned int max_size; member 211 if (group->count >= group->max_size) { in sdw_add_element_group_count() 214 group->max_size += 1; in sdw_add_element_group_count() 216 (sizeof(int) * group->max_size), in sdw_add_element_group_count() 237 group->max_size = SDW_STRM_RATE_GROUPING; in sdw_get_group_count() 238 group->rates = kcalloc(group->max_size, sizeof(int), GFP_KERNEL); in sdw_get_group_count()
|
/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | rqt.c | 17 u16 max_size, u32 *init_rqns, u16 init_size) in mlx5e_rqt_init() argument 26 rqt->size = max_size; in mlx5e_rqt_init() 50 u16 max_size = indir_enabled ? MLX5E_INDIR_RQT_SIZE : 1; in mlx5e_rqt_init_direct() local 52 return mlx5e_rqt_init(rqt, mdev, max_size, &init_rqn, 1); in mlx5e_rqt_init_direct()
|
/drivers/net/ethernet/netronome/nfp/nfpcore/ |
D | nfp_nsp.c | 496 unsigned int max_size, unsigned int chunk_order, in nfp_nsp_command_buf_dma_sg() argument 515 nseg = DIV_ROUND_UP(max_size, chunk_size); in nfp_nsp_command_buf_dma_sg() 531 chunks[i].len = min_t(u64, chunk_size, max_size - off); in nfp_nsp_command_buf_dma_sg() 618 arg->arg.code, ret, max_size, chunk_order); in nfp_nsp_command_buf_dma_sg() 625 unsigned int max_size, unsigned int dma_order) in nfp_nsp_command_buf_dma() argument 633 buf_order = order_base_2(roundup_pow_of_two(max_size)); in nfp_nsp_command_buf_dma() 653 return nfp_nsp_command_buf_dma_sg(nsp, arg, max_size, chunk_order, in nfp_nsp_command_buf_dma() 660 unsigned int dma_order, def_size, max_size; in nfp_nsp_command_buf() local 682 max_size = max(arg->in_size, arg->out_size); in nfp_nsp_command_buf() 686 if (def_size >= max_size) { in nfp_nsp_command_buf() [all …]
|
/drivers/net/wireless/ath/ath12k/ |
D | hal.c | 21 .max_size = HAL_REO_REO2SW1_RING_BASE_MSB_RING_SIZE, 32 .max_size = HAL_REO_REO2SW0_RING_BASE_MSB_RING_SIZE, 40 .max_size = HAL_REO_SW2REO_RING_BASE_MSB_RING_SIZE, 49 .max_size = HAL_REO_CMD_RING_BASE_MSB_RING_SIZE, 58 .max_size = HAL_REO_STATUS_RING_BASE_MSB_RING_SIZE, 66 .max_size = HAL_SW2TCL1_RING_BASE_MSB_RING_SIZE, 74 .max_size = HAL_SW2TCL1_CMD_RING_BASE_MSB_RING_SIZE, 83 .max_size = HAL_TCL_STATUS_RING_BASE_MSB_RING_SIZE, 91 .max_size = HAL_CE_SRC_RING_BASE_MSB_RING_SIZE, 99 .max_size = HAL_CE_DST_RING_BASE_MSB_RING_SIZE, [all …]
|
/drivers/firmware/efi/ |
D | capsule.c | 91 u64 max_size; in efi_capsule_supported() local 100 status = efi.query_capsule_caps(cap_list, 1, &max_size, reset); in efi_capsule_supported() 104 if (size > max_size) in efi_capsule_supported()
|
/drivers/infiniband/hw/hns/ |
D | hns_roce_alloc.c | 136 unsigned int offset, max_size; in hns_roce_get_kmem_bufs() local 147 max_size = buf->ntrunks << buf->trunk_shift; in hns_roce_get_kmem_bufs() 148 for (i = 0; i < buf_cnt && offset < max_size; i++) { in hns_roce_get_kmem_bufs()
|
/drivers/crypto/virtio/ |
D | virtio_crypto_core.c | 355 u64 max_size = 0; in virtcrypto_probe() local 399 max_size, &max_size); in virtcrypto_probe() 435 vcrypto->max_size = max_size; in virtcrypto_probe() 450 vcrypto->max_size); in virtcrypto_probe()
|
/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 | 788 int max_size = fnic_fc_trace_max_pages * PAGE_SIZE * 3; in copy_and_format_trace_data() local 795 len += scnprintf(fnic_dbgfs_prt->buffer + len, max_size - len, in copy_and_format_trace_data() 806 max_size - len, "%c", fc_trace[j]); in copy_and_format_trace_data() 809 max_size - len, "%02x", fc_trace[j] & 0xff); in copy_and_format_trace_data() 811 max_size - len, " "); in copy_and_format_trace_data() 817 + len, max_size - len, in copy_and_format_trace_data() 824 max_size - len, "\n"); in copy_and_format_trace_data()
|
/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/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/vdpa/ifcvf/ |
D | ifcvf_base.c | 88 u16 queue_size, max_size, qid; in ifcvf_get_max_vq_size() local 90 max_size = ifcvf_get_vq_size(hw, 0); in ifcvf_get_max_vq_size() 97 max_size = min(queue_size, max_size); in ifcvf_get_max_vq_size() 100 return max_size; in ifcvf_get_max_vq_size()
|
/drivers/mailbox/ |
D | imx-mailbox.c | 263 u32 size, max_size, num_tr; in imx_mu_specific_tx() local 267 max_size = sizeof(struct imx_s4_rpc_msg_max); in imx_mu_specific_tx() 271 max_size = sizeof(struct imx_sc_rpc_msg_max); in imx_mu_specific_tx() 282 if (size > max_size / 4) { in imx_mu_specific_tx() 287 …dev_err(priv->dev, "Maximal message size (%u bytes) exceeded on TX; got: %i bytes\n", max_size, si… in imx_mu_specific_tx() 320 u32 size, max_size; in imx_mu_specific_rx() local 329 max_size = sizeof(struct imx_s4_rpc_msg_max); in imx_mu_specific_rx() 332 max_size = sizeof(struct imx_sc_rpc_msg_max); in imx_mu_specific_rx() 335 if (size > max_size / 4) { in imx_mu_specific_rx() 336 …dev_err(priv->dev, "Maximal message size (%u bytes) exceeded on RX; got: %i bytes\n", max_size, si… in imx_mu_specific_rx()
|