Home
last modified time | relevance | path

Searched refs:struct_size (Results 1 – 25 of 471) sorted by relevance

12345678910>>...19

/linux/drivers/gpu/drm/amd/display/dc/basics/
H A Dvector.c33 uint32_t struct_size) in dal_vector_construct() argument
37 if (!struct_size || !capacity) { in dal_vector_construct()
43 vector->container = kcalloc(capacity, struct_size, GFP_KERNEL); in dal_vector_construct()
47 vector->struct_size = struct_size; in dal_vector_construct()
57 uint32_t struct_size) in dal_vector_presized_costruct() argument
63 if (!struct_size || !count) { in dal_vector_presized_costruct()
69 vector->container = kcalloc(count, struct_size, GFP_KERNEL); in dal_vector_presized_costruct()
80 vector->container + i * struct_size, in dal_vector_presized_costruct()
82 struct_size); in dal_vector_presized_costruct()
86 vector->struct_size = struct_size; in dal_vector_presized_costruct()
[all …]
/linux/drivers/gpu/drm/amd/display/include/
H A Dvector.h31 uint32_t struct_size; member
41 uint32_t struct_size);
46 uint32_t struct_size);
54 uint32_t struct_size);
/linux/scripts/coccinelle/misc/
H A Dstruct_size.cocci3 /// Check for code that could use struct_size().
46 + struct_size(E1, m, E2)
66 coccilib.org.print_todo(p[0], "WARNING should use struct_size")
72 msg="WARNING: Use struct_size"
H A Darray_size_dup.cocci3 /// Check for array_size(), array3_size(), struct_size() duplicates.
153 struct_size(E1, E2, E3)
165 * struct_size(E1, E2, E3)@p2
172 msg = "WARNING: struct_size is used later (line %s) to compute the same size" % (p2[0].line)
180 msg = "WARNING: struct_size is used later (line %s) to compute the same size" % (p2[0].line)
190 * struct_size(E1, E2, E3)@p1
200 msg = "WARNING: struct_size is already used (line %s) to compute the same size" % (p1[0].line)
208 msg = "WARNING: struct_size is already used (line %s) to compute the same size" % (p1[0].line)
/linux/sound/soc/codecs/
H A Dcs-amp-lib-test.c69 KUNIT_ASSERT_EQ(test, struct_size(priv->cal_blob, data, priv->cal_blob->count), in cs_amp_lib_test_cal_blob_dup()
84 blob_size = struct_size(priv->cal_blob, data, num_amps); in cs_amp_lib_test_init_dummy_cal_blob()
289 KUNIT_ASSERT_EQ(test, *size, struct_size(priv->cal_blob, data, 8)); in cs_amp_lib_test_get_efi_variable_all_zeros()
904 KUNIT_EXPECT_EQ(test, struct_size(priv->cal_blob, data, priv->cal_blob->count), in cs_amp_lib_test_create_new_cal_efi()
916 KUNIT_EXPECT_EQ(test, struct_size(priv->cal_blob, data, 2), priv->cal_blob->size); in cs_amp_lib_test_create_new_cal_efi()
925 KUNIT_EXPECT_EQ(test, struct_size(priv->cal_blob, data, 4), priv->cal_blob->size); in cs_amp_lib_test_create_new_cal_efi()
936 KUNIT_EXPECT_EQ(test, struct_size(priv->cal_blob, data, 6), priv->cal_blob->size); in cs_amp_lib_test_create_new_cal_efi()
963 KUNIT_EXPECT_EQ(test, struct_size(priv->cal_blob, data, 6), priv->cal_blob->size); in cs_amp_lib_test_create_new_cal_efi_indexed()
976 KUNIT_EXPECT_EQ(test, struct_size(priv->cal_blob, data, 6), priv->cal_blob->size); in cs_amp_lib_test_create_new_cal_efi_indexed()
989 KUNIT_EXPECT_EQ(test, struct_size(pri in cs_amp_lib_test_create_new_cal_efi_indexed()
[all...]
H A Dcs-amp-lib.c383 struct_size(efi_data, data, efi_data->count) > data_size) { in cs_amp_set_cal_efi_buffer()
411 struct_size(data, data, data->count), data); in _cs_amp_get_efi_calibration_data()
544 unsigned int new_data_size = struct_size(data, data, num_entries);
553 memcpy(new_data, data, struct_size(data, data, data->count));
/linux/drivers/char/tpm/eventlog/
H A Dtpm2.c54 size = struct_size(event_header, event, event_header->event_size); in tpm2_bios_measurements_start()
100 event_size = struct_size(event_header, event, in tpm2_bios_measurements_next()
138 size = struct_size(event_header, event, in tpm2_binary_bios_measurements_show()
/linux/net/xdp/
H A Dxsk_queue.c20 return struct_size(umem_ring, desc, q->nentries); in xskq_get_ring_size()
21 return struct_size(rxtx_ring, desc, q->nentries); in xskq_get_ring_size()
/linux/drivers/i2c/busses/
H A Di2c-ljca.c74 struct_size(w_packet, data, 1), NULL, 0); in ljca_i2c_init()
94 struct_size(w_packet, data, 1), (u8 *)r_packet, in ljca_i2c_start()
124 struct_size(w_packet, data, 1), (u8 *)r_packet, in ljca_i2c_stop()
154 struct_size(w_packet, data, 1), (u8 *)r_packet, in ljca_i2c_pure_read()
200 struct_size(w_packet, data, len), (u8 *)r_packet, in ljca_i2c_pure_write()
/linux/drivers/firmware/efi/libstub/
H A Drandom.c106 struct_size(seed, bits, seed_size), in efi_random_get_seed()
172 memzero_explicit(seed, struct_size(seed, bits, seed_size)); in efi_random_get_seed()
/linux/drivers/cxl/core/
H A Dfeatures.c106 hdr_size = struct_size(mbox_out, ents, 0); in get_supported_features()
119 alloc_size = struct_size(mbox_out, ents, max_feats); in get_supported_features()
123 alloc_size = struct_size(mbox_out, ents, remain_feats); in get_supported_features()
417 struct_size(feat_out, ents, requested); in cxlctl_get_supported_features()
424 rpc_out->size = struct_size(feat_out, ents, requested); in cxlctl_get_supported_features()
/linux/drivers/platform/x86/intel/int3472/
H A Dtps68470.c120 *clk_pdata = devm_kzalloc(dev, struct_size(*clk_pdata, consumers, n_consumers), in skl_int3472_fill_clk_pdata()
195 cells[0].pdata_size = struct_size(clk_pdata, consumers, n_consumers); in skl_int3472_tps68470_probe()
/linux/drivers/gpio/
H A Dgpio-ljca.c90 struct_size(packet, item, packet->num), NULL, 0); in ljca_gpio_config()
108 struct_size(packet, item, packet->num), in ljca_gpio_read()
134 struct_size(packet, item, packet->num), NULL, 0); in ljca_gpio_write()
263 (u8 *)packet, struct_size(packet, item, packet->num), in ljca_enable_irq()
/linux/drivers/net/can/usb/
H A Dgs_usb.c590 minimum_length = struct_size(hf, canfd_ts, 1); in gs_usb_get_minimum_rx_length()
600 minimum_length = struct_size(hf, classic_can_ts, 1); in gs_usb_get_minimum_rx_length()
971 dev->hf_size_tx = struct_size(hf, canfd_quirk, 1); in gs_can_open()
973 dev->hf_size_tx = struct_size(hf, canfd, 1); in gs_can_open()
976 dev->hf_size_tx = struct_size(hf, classic_can_quirk, 1); in gs_can_open()
978 dev->hf_size_tx = struct_size(hf, classic_can, 1); in gs_can_open()
1612 hf_size_rx = struct_size(hf, canfd_ts, 1); in gs_usb_probe()
1614 hf_size_rx = struct_size(hf, canfd, 1); in gs_usb_probe()
1617 hf_size_rx = struct_size(hf, classic_can_ts, 1); in gs_usb_probe()
1619 hf_size_rx = struct_size(hf, classic_can, 1); in gs_usb_probe()
/linux/drivers/net/ethernet/netronome/nfp/flower/
H A Dcmsg.c49 skb = nfp_flower_cmsg_alloc(app, struct_size(msg, ports, num_ports), in nfp_flower_cmsg_mac_repr_start()
220 if (msg_len < struct_size(msg, flow, flow_cnt)) { in nfp_flower_cmsg_merge_hint_rx()
222 msg_len, struct_size(msg, flow, flow_cnt)); in nfp_flower_cmsg_merge_hint_rx()
/linux/drivers/net/ethernet/intel/ice/
H A Dice_switch.h28 #define ICE_SW_RULE_VSI_LIST_SIZE(s, n) struct_size((s), vsi, (n))
29 #define ICE_SW_RULE_RX_TX_HDR_SIZE(s, l) struct_size((s), hdr_data, (l))
34 #define ICE_SW_RULE_LG_ACT_SIZE(s, n) struct_size((s), act, (n))
/linux/drivers/interconnect/
H A Dicc-clk.c87 onecell = devm_kzalloc(dev, struct_size(onecell, nodes, 2 * num_clocks), GFP_KERNEL); in icc_clk_register()
92 qp = devm_kzalloc(dev, struct_size(qp, clocks, num_clocks), GFP_KERNEL); in icc_clk_register()
/linux/drivers/net/ethernet/intel/idpf/
H A Didpf_virtchnl_ptp.c370 size = struct_size(rcv_tx_tstamp_caps, tstamp_latches, num_latches); in idpf_ptp_get_vport_tstamps_caps()
376 size = struct_size(tstamp_caps, tx_tstamp_status, num_latches); in idpf_ptp_get_vport_tstamps_caps()
639 size = struct_size(send_tx_tstamp_msg, tstamp_latches, in idpf_ptp_get_tx_tstamp()
662 msg_size = struct_size(send_tx_tstamp_msg, tstamp_latches, id); in idpf_ptp_get_tx_tstamp()
/linux/drivers/iommu/iommufd/
H A Dvfio_compat.c396 if (avail >= struct_size(&cap_iovas, iova_ranges, in iommufd_fill_cap_iova()
403 if (avail >= struct_size(&cap_iovas, iova_ranges, cap_iovas.nr_iovas) && in iommufd_fill_cap_iova()
406 return struct_size(&cap_iovas, iova_ranges, cap_iovas.nr_iovas); in iommufd_fill_cap_iova()
/linux/drivers/nvdimm/
H A Dramdax.c144 if (struct_size(cmd, out_buf, cmd->in_length) > buf_len) in ramdax_get_config_data()
161 if (struct_size(cmd, in_buf, cmd->in_length) > buf_len) in ramdax_set_config_data()
/linux/drivers/clk/imx/
H A Dclk-imx8ulp.c152 clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, IMX8ULP_CLK_CGC1_END), in imx8ulp_clk_cgc1_init()
236 clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, IMX8ULP_CLK_CGC2_END), in imx8ulp_clk_cgc2_init()
319 clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, IMX8ULP_CLK_PCC3_END), in imx8ulp_clk_pcc3_init()
402 clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, IMX8ULP_CLK_PCC4_END), in imx8ulp_clk_pcc4_init()
457 clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, IMX8ULP_CLK_PCC5_END), in imx8ulp_clk_pcc5_init()
/linux/fs/afs/
H A Daddr_prefs.c218 size = struct_size(preflist, prefs, max_prefs); in afs_insert_address_pref()
399 psize = struct_size(old, prefs, max_prefs); in afs_proc_addr_prefs_write()
409 memcpy(preflist, old, struct_size(preflist, prefs, old->nr)); in afs_proc_addr_prefs_write()
/linux/drivers/clk/bcm/
H A Dclk-bcm2835-aux.c34 struct_size(onecell, hws, in bcm2835_aux_clk_probe()
/linux/Documentation/translations/it_IT/process/
H A Ddeprecated.rst99 header = kzalloc(struct_size(header, item, count), GFP_KERNEL);
101 .. note:: Se per caso state usando struct_size() su una struttura dati che
327 instance = kmalloc(struct_size(instance, items, count), GFP_KERNEL);
362 instance = kmalloc(struct_size(instance, items, count - 1), GFP_KERNEL);
369 struct_size(), altrimenti avremmo --inavvertitamente-- allocato
372 combinazione con struct_size() e flex_array_size()::
381 instance = kmalloc(struct_size(instance, items, count), GFP_KERNEL);
/linux/kernel/bpf/
H A Dreuseport_array.c155 array = bpf_map_area_alloc(struct_size(array, ptrs, attr->max_entries), numa_node); in reuseport_array_alloc()
339 return struct_size(array, ptrs, map->max_entries); in reuseport_array_mem_usage()

12345678910>>...19