/linux-6.6.21/scripts/coccinelle/api/alloc/ |
D | alloc_cast.cocci | 6 //# kmalloc, kzalloc, kcalloc, kmem_cache_alloc, kmem_cache_zalloc, 34 \(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| 57 \(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| 80 \(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| 97 \(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
|
/linux-6.6.21/arch/powerpc/platforms/powernv/ |
D | opal-sysparam.c | 188 id = kcalloc(count, sizeof(*id), GFP_KERNEL); in opal_sys_param_init() 195 size = kcalloc(count, sizeof(*size), GFP_KERNEL); in opal_sys_param_init() 202 perm = kcalloc(count, sizeof(*perm), GFP_KERNEL); in opal_sys_param_init() 225 attr = kcalloc(count, sizeof(*attr), GFP_KERNEL); in opal_sys_param_init()
|
D | opal-imc.c | 94 base_addr_arr = kcalloc(nr_chips, sizeof(*base_addr_arr), GFP_KERNEL); in imc_get_mem_addr_nest() 98 chipid_arr = kcalloc(nr_chips, sizeof(*chipid_arr), GFP_KERNEL); in imc_get_mem_addr_nest() 111 pmu_ptr->mem_info = kcalloc(nr_chips + 1, sizeof(*pmu_ptr->mem_info), in imc_get_mem_addr_nest()
|
D | opal-sensor-groups.c | 171 sgs = kcalloc(of_get_child_count(sg), sizeof(*sgs), GFP_KERNEL); in opal_sensor_groups_init() 193 sgs[i].sgattrs = kcalloc(nr_attrs, sizeof(*sgs[i].sgattrs), in opal_sensor_groups_init() 198 sgs[i].sg.attrs = kcalloc(nr_attrs + 1, in opal_sensor_groups_init()
|
D | opal-powercap.c | 153 pcaps = kcalloc(of_get_child_count(powercap), sizeof(*pcaps), in opal_powercap_init() 185 pcaps[i].pattrs = kcalloc(j, sizeof(struct powercap_attr), in opal_powercap_init() 190 pcaps[i].pg.attrs = kcalloc(j + 1, sizeof(struct attribute *), in opal_powercap_init()
|
/linux-6.6.21/drivers/irqchip/ |
D | irq-mtk-sysirq.c | 149 chip_data->intpol_words = kcalloc(nr_intpol_bases, in mtk_sysirq_of_init() 157 chip_data->intpol_bases = kcalloc(nr_intpol_bases, in mtk_sysirq_of_init() 180 chip_data->intpol_idx = kcalloc(intpol_num, in mtk_sysirq_of_init() 188 chip_data->which_word = kcalloc(intpol_num, in mtk_sysirq_of_init()
|
/linux-6.6.21/drivers/iio/ |
D | industrialio-gts-helper.c | 206 all_gains = kcalloc(gts->num_itime, gain_bytes, GFP_KERNEL); in gain_to_scaletables() 246 gts->avail_all_scales_table = kcalloc(new_idx, 2 * sizeof(int), in gain_to_scaletables() 293 per_time_gains = kcalloc(gts->num_itime, sizeof(*per_time_gains), GFP_KERNEL); in iio_gts_build_avail_scale_table() 297 per_time_scales = kcalloc(gts->num_itime, sizeof(*per_time_scales), GFP_KERNEL); in iio_gts_build_avail_scale_table() 302 per_time_scales[i] = kcalloc(gts->num_hwgain, 2 * sizeof(int), in iio_gts_build_avail_scale_table() 307 per_time_gains[i] = kcalloc(gts->num_hwgain, sizeof(int), in iio_gts_build_avail_scale_table() 370 times = kcalloc(gts->num_itime, sizeof(int), GFP_KERNEL); in iio_gts_build_avail_time_table() 394 int_micro_times = kcalloc(idx, sizeof(int) * 2, GFP_KERNEL); in iio_gts_build_avail_time_table()
|
/linux-6.6.21/drivers/base/regmap/ |
D | regmap-ram.c | 68 data->read = kcalloc(sizeof(bool), config->max_register + 1, in __regmap_init_ram() 73 data->written = kcalloc(sizeof(bool), config->max_register + 1, in __regmap_init_ram()
|
D | regmap-raw-ram.c | 114 data->read = kcalloc(sizeof(bool), config->max_register + 1, in __regmap_init_raw_ram() 119 data->written = kcalloc(sizeof(bool), config->max_register + 1, in __regmap_init_raw_ram()
|
/linux-6.6.21/drivers/xen/ |
D | arm-device.c | 62 gpfns = kcalloc(nr, sizeof(xen_pfn_t), GFP_KERNEL); in xen_map_device_mmio() 63 idxs = kcalloc(nr, sizeof(xen_ulong_t), GFP_KERNEL); in xen_map_device_mmio() 64 errs = kcalloc(nr, sizeof(int), GFP_KERNEL); in xen_map_device_mmio()
|
D | xen-front-pgdir-shbuf.c | 208 unmap_ops = kcalloc(buf->num_pages, sizeof(*unmap_ops), in backend_unmap() 253 map_ops = kcalloc(buf->num_pages, sizeof(*map_ops), GFP_KERNEL); in backend_map() 257 buf->backend_map_handles = kcalloc(buf->num_pages, in backend_map() 477 buf->grefs = kcalloc(buf->num_grefs, sizeof(*buf->grefs), GFP_KERNEL); in alloc_storage() 481 buf->directory = kcalloc(get_num_pages_dir(buf), PAGE_SIZE, GFP_KERNEL); in alloc_storage()
|
/linux-6.6.21/lib/ |
D | group_cpus.c | 50 masks = kcalloc(nr_node_ids, sizeof(cpumask_var_t), GFP_KERNEL); in alloc_node_to_cpumask() 280 node_groups = kcalloc(nr_node_ids, in __group_cpus_evenly() 365 masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL); in group_cpus_evenly() 429 struct cpumask *masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL); in group_cpus_evenly()
|
D | test_memcat_p.c | 27 in0 = kcalloc(INPUT_MAX, sizeof(*in0), GFP_KERNEL); in test_memcat_p_init() 31 in1 = kcalloc(INPUT_MAX, sizeof(*in1), GFP_KERNEL); in test_memcat_p_init()
|
/linux-6.6.21/scripts/coccinelle/null/ |
D | eno.cocci | 21 x = \(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\|kmallo… 31 *x = \(kmalloc@p1\|kzalloc@p1\|kcalloc@p1\|kmem_cache_alloc@p1\|kmem_cache_zalloc@p1\|kmem_cache_al…
|
/linux-6.6.21/net/smc/ |
D | smc_wr.c | 744 link->wr_tx_bufs = kcalloc(SMC_WR_BUF_CNT, SMC_WR_BUF_SIZE, GFP_KERNEL); in smc_wr_alloc_link_mem() 747 link->wr_rx_bufs = kcalloc(SMC_WR_BUF_CNT * 3, SMC_WR_BUF_SIZE, in smc_wr_alloc_link_mem() 751 link->wr_tx_ibs = kcalloc(SMC_WR_BUF_CNT, sizeof(link->wr_tx_ibs[0]), in smc_wr_alloc_link_mem() 755 link->wr_rx_ibs = kcalloc(SMC_WR_BUF_CNT * 3, in smc_wr_alloc_link_mem() 760 link->wr_tx_rdmas = kcalloc(SMC_WR_BUF_CNT, in smc_wr_alloc_link_mem() 765 link->wr_tx_rdma_sges = kcalloc(SMC_WR_BUF_CNT, in smc_wr_alloc_link_mem() 770 link->wr_tx_sges = kcalloc(SMC_WR_BUF_CNT, sizeof(link->wr_tx_sges[0]), in smc_wr_alloc_link_mem() 774 link->wr_rx_sges = kcalloc(SMC_WR_BUF_CNT * 3, in smc_wr_alloc_link_mem() 782 link->wr_tx_pends = kcalloc(SMC_WR_BUF_CNT, in smc_wr_alloc_link_mem() 787 link->wr_tx_compl = kcalloc(SMC_WR_BUF_CNT, in smc_wr_alloc_link_mem()
|
/linux-6.6.21/drivers/gpu/drm/amd/display/amdgpu_dm/ |
D | amdgpu_dm_debugfs.c | 199 rd_buf = kcalloc(rd_buf_size, sizeof(char), GFP_KERNEL); in dp_link_settings_read() 271 wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); in dp_link_settings_write() 405 wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); in dp_mst_link_setting() 540 rd_buf = kcalloc(rd_buf_size, sizeof(char), GFP_KERNEL); in dp_phy_settings_read() 623 wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); in dp_phy_settings_write() 775 wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); in dp_phy_test_pattern_debugfs_write() 1131 wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); in dp_dsc_passthrough_set() 1346 wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); in trigger_hotplug() 1458 rd_buf = kcalloc(rd_buf_size, sizeof(char), GFP_KERNEL); in dp_dsc_clock_en_read() 1545 wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); in dp_dsc_clock_en_write() [all …]
|
/linux-6.6.21/drivers/iio/imu/ |
D | adis_buffer.c | 36 adis->xfer = kcalloc(2, sizeof(*adis->xfer), GFP_KERNEL); in adis_update_scan_mode_burst() 86 adis->xfer = kcalloc(scan_count + 1, sizeof(*adis->xfer), GFP_KERNEL); in adis_update_scan_mode() 90 adis->buffer = kcalloc(indio_dev->scan_bytes, 2, GFP_KERNEL); in adis_update_scan_mode()
|
/linux-6.6.21/drivers/sh/intc/ |
D | core.c | 221 d->window = kcalloc(d->nr_windows, sizeof(*d->window), in register_intc_controller() 248 d->reg = kcalloc(d->nr_reg, sizeof(*d->reg), GFP_NOWAIT); in register_intc_controller() 253 d->smp = kcalloc(d->nr_reg, sizeof(*d->smp), GFP_NOWAIT); in register_intc_controller() 271 d->prio = kcalloc(hw->nr_vectors, sizeof(*d->prio), in register_intc_controller() 287 d->sense = kcalloc(hw->nr_vectors, sizeof(*d->sense), in register_intc_controller()
|
/linux-6.6.21/scripts/coccinelle/api/ |
D | kfree_mismatch.cocci | 25 E = \(kmalloc\|kzalloc\|krealloc\|kcalloc\| 38 E = \(kmalloc\|kzalloc\|krealloc\|kcalloc\|kmalloc_node\|kzalloc_node\| 68 * E = \(kmalloc\|kzalloc\|krealloc\|kcalloc\|kmalloc_node\| 82 E = \(kmalloc\|kzalloc\|krealloc\|kcalloc\|kmalloc_node\|
|
/linux-6.6.21/drivers/gpu/drm/nouveau/nvkm/engine/gr/ |
D | gv100.c | 131 if (!(num_tpc_gpc = kcalloc(gr->gpc_nr, sizeof(*num_tpc_gpc), GFP_KERNEL))) in gv100_gr_scg_estimate_perf() 234 gpc_tpc_mask = kcalloc(gr->gpc_nr, sizeof(*gpc_tpc_mask), GFP_KERNEL); in gv100_gr_oneinit_sm_id() 235 gpc_table = kcalloc(gr->tpc_total, sizeof(*gpc_table), GFP_KERNEL); in gv100_gr_oneinit_sm_id() 236 tpc_table = kcalloc(gr->tpc_total, sizeof(*tpc_table), GFP_KERNEL); in gv100_gr_oneinit_sm_id()
|
/linux-6.6.21/drivers/platform/x86/x86-android-tablets/ |
D | core.c | 312 i2c_clients = kcalloc(dev_info->i2c_client_count, sizeof(*i2c_clients), GFP_KERNEL); in x86_android_tablet_init() 328 pdevs = kcalloc(dev_info->pdev_count + 1, sizeof(*pdevs), GFP_KERNEL); in x86_android_tablet_init() 343 serdevs = kcalloc(dev_info->serdev_count, sizeof(*serdevs), GFP_KERNEL); in x86_android_tablet_init() 362 buttons = kcalloc(dev_info->gpio_button_count, sizeof(*buttons), GFP_KERNEL); in x86_android_tablet_init()
|
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_acp.c | 269 adev->acp.acp_cell = kcalloc(2, sizeof(struct mfd_cell), in acp_hw_init() 276 adev->acp.acp_res = kcalloc(3, sizeof(struct resource), GFP_KERNEL); in acp_hw_init() 282 i2s_pdata = kcalloc(1, sizeof(struct i2s_platform_data), GFP_KERNEL); in acp_hw_init() 331 adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell), in acp_hw_init() 339 adev->acp.acp_res = kcalloc(5, sizeof(struct resource), GFP_KERNEL); in acp_hw_init() 345 i2s_pdata = kcalloc(3, sizeof(struct i2s_platform_data), GFP_KERNEL); in acp_hw_init()
|
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
D | dr_buddy.c | 19 buddy->bitmap = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init() 22 buddy->num_free = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init()
|
/linux-6.6.21/drivers/misc/echo/ |
D | fir.h | 77 fir->history = kcalloc(taps, sizeof(int16_t), GFP_KERNEL); in fir16_create() 119 fir->history = kcalloc(taps, sizeof(int16_t), GFP_KERNEL); in fir32_create()
|
/linux-6.6.21/drivers/net/dsa/sja1105/ |
D | sja1105_devlink.c | 48 *data = kcalloc(max_len, sizeof(u8), GFP_KERNEL); in sja1105_region_static_config_snapshot() 85 priv->regions = kcalloc(num_regions, sizeof(struct devlink_region *), in sja1105_setup_devlink_regions()
|