/openbmc/linux/lib/ |
H A D | asn1_encoder.c | 27 int data_len = end_data - data; in asn1_encode_integer() local 40 if (data_len < 3) in asn1_encode_integer() 44 data_len -= 2; in asn1_encode_integer() 70 data_len--; in asn1_encode_integer() 74 if (data_len == 0) in asn1_encode_integer() 78 data_len--; in asn1_encode_integer() 89 static int asn1_encode_oid_digit(unsigned char **_data, int *data_len, u32 oid) in asn1_encode_oid_digit() argument 95 if (*data_len < 1) in asn1_encode_oid_digit() 101 (*data_len)--; in asn1_encode_oid_digit() 108 while (start > 0 && *data_len > 0) { in asn1_encode_oid_digit() [all …]
|
H A D | test_blackhole_dev.c | 33 int data_len; in test_blackholedev_init() local 44 data_len = SKB_SIZE - (HEAD_SIZE + TAIL_SIZE); in test_blackholedev_init() 45 memset(__skb_put(skb, data_len), 0xf, data_len); in test_blackholedev_init() 52 uh->len = htons(data_len); in test_blackholedev_init() 58 ip6h->payload_len = data_len + sizeof(struct udphdr); in test_blackholedev_init()
|
/openbmc/ipmitool/src/plugins/open/ |
H A D | open.c | 181 int data_len = 0; in ipmi_openipmi_send_cmd() local 197 printbuf(req->msg.data, req->msg.data_len, "OpenIPMI Request Message Data"); in ipmi_openipmi_send_cmd() 237 if (req->msg.data && req->msg.data_len) { in ipmi_openipmi_send_cmd() 238 fprintf(stderr, " data_len = %d\n", req->msg.data_len); in ipmi_openipmi_send_cmd() 240 buf2str(req->msg.data,req->msg.data_len)); in ipmi_openipmi_send_cmd() 249 data_len = req->msg.data_len + 8; in ipmi_openipmi_send_cmd() 250 data = malloc(data_len); in ipmi_openipmi_send_cmd() 256 memset(data, 0, data_len); in ipmi_openipmi_send_cmd() 265 memcpy( (data+index) , req->msg.data, req->msg.data_len); in ipmi_openipmi_send_cmd() 266 index += req->msg.data_len; in ipmi_openipmi_send_cmd() [all …]
|
/openbmc/linux/drivers/nfc/st-nci/ |
H A D | vendor_cmds.c | 40 size_t data_len) in st_nci_factory_mode() argument 45 if (data_len != 1) in st_nci_factory_mode() 65 size_t data_len) in st_nci_hci_clear_all_pipes() argument 73 size_t data_len) in st_nci_hci_dm_put_data() argument 79 data_len, NULL); in st_nci_hci_dm_put_data() 83 size_t data_len) in st_nci_hci_dm_update_aid() argument 88 ST_NCI_HCI_DM_UPDATE_AID, data, data_len, NULL); in st_nci_hci_dm_update_aid() 92 size_t data_len) in st_nci_hci_dm_get_info() argument 99 data, data_len, &skb); in st_nci_hci_dm_get_info() 124 size_t data_len) in st_nci_hci_dm_get_data() argument [all …]
|
/openbmc/linux/net/bluetooth/ |
H A D | eir.h | 19 u8 data_len); 21 static inline u16 eir_precalc_len(u8 data_len) in eir_precalc_len() argument 23 return sizeof(u8) * 2 + data_len; in eir_precalc_len() 27 u8 *data, u8 data_len) in eir_append_data() argument 29 eir[eir_len++] = sizeof(type) + data_len; in eir_append_data() 31 memcpy(&eir[eir_len], data, data_len); in eir_append_data() 32 eir_len += data_len; in eir_append_data() 47 static inline u16 eir_skb_put_data(struct sk_buff *skb, u8 type, u8 *data, u8 data_len) in eir_skb_put_data() argument 52 eir_len = eir_precalc_len(data_len); in eir_skb_put_data() 54 WARN_ON(sizeof(type) + data_len > U8_MAX); in eir_skb_put_data() [all …]
|
/openbmc/ipmitool/src/plugins/dummy/ |
H A D | dummy.c | 60 data_read(int fd, void *data_ptr, int data_len) in data_read() argument 67 if (data_len < 0) { in data_read() 70 while (data_total < data_len && try < 4) { in data_read() 73 data_read = read(fd, data_ptr, data_len); in data_read() 91 if (try > 3 && data_total != data_len) { in data_read() 105 data_write(int fd, void *data_ptr, int data_len) in data_write() argument 112 if (data_len < 0) { in data_write() 115 while (data_total < data_len && try < 4) { in data_write() 118 data_written = write(fd, data_ptr, data_len); in data_write() 136 if (try > 3 && data_total != data_len) { in data_write() [all …]
|
/openbmc/qemu/hw/usb/ |
H A D | pcap.c | 134 int data_len = dev->setup_len; in do_usb_pcap_ctrl() local 136 if (data_len > CTRL_LEN) { in do_usb_pcap_ctrl() 137 data_len = CTRL_LEN; in do_usb_pcap_ctrl() 148 data_len = 0; in do_usb_pcap_ctrl() 153 data_len = 0; in do_usb_pcap_ctrl() 156 packet.len_cap = data_len + sizeof(packet); in do_usb_pcap_ctrl() 158 if (data_len) { in do_usb_pcap_ctrl() 159 fwrite(dev->data_buf, data_len, 1, fp); in do_usb_pcap_ctrl() 177 int data_len = p->iov.size; in do_usb_pcap_data() local 184 if (data_len > DATA_LEN) { in do_usb_pcap_data() [all …]
|
H A D | dev-storage.c | 33 uint32_t data_len; member 220 if (len > s->data_len) { in usb_msd_copy_data() 221 len = s->data_len; in usb_msd_copy_data() 223 s->data_len -= len; in usb_msd_copy_data() 224 if (s->scsi_len == 0 || s->data_len == 0) { in usb_msd_copy_data() 273 s->csw.residue = cpu_to_le32(s->data_len); in usb_msd_command_complete() 277 if (s->data_len == 0 && s->mode == USB_MSDM_DATAOUT) { in usb_msd_command_complete() 286 if (s->data_len) { in usb_msd_command_complete() 289 if (len > s->data_len) { in usb_msd_command_complete() 290 len = s->data_len; in usb_msd_command_complete() [all …]
|
/openbmc/ipmitool/lib/ |
H A D | ipmi_session.c | 69 int data_len) in print_session_info_csv() argument 78 if (data_len == 3) in print_session_info_csv() 93 if (data_len == 18) in print_session_info_csv() 118 else if ((data_len == 12) || (data_len == 14)) in print_session_info_csv() 134 if (data_len == 14) in print_session_info_csv() 155 int data_len) in print_session_info_verbose() argument 164 if (data_len == 3) in print_session_info_verbose() 181 if (data_len == 18) in print_session_info_verbose() 206 else if ((data_len == 12) || (data_len == 14)) in print_session_info_verbose() 222 if (data_len == 14) in print_session_info_verbose() [all …]
|
H A D | ipmi_vita.c | 183 req.msg.data_len = 1; in vita_discover() 204 } else if (rsp->data_len < 5) { in vita_discover() 206 rsp->data_len); in vita_discover() 237 req.msg.data_len = 1; in ipmi_vita_ipmb_address() 248 } else if (rsp->data_len < 7) { in ipmi_vita_ipmb_address() 250 rsp->data_len); in ipmi_vita_ipmb_address() 273 req.msg.data_len = 2; in ipmi_vita_getaddr() 294 } else if (rsp->data_len < 7) { in ipmi_vita_getaddr() 296 rsp->data_len); in ipmi_vita_getaddr() 310 if (rsp->data_len > 8) { in ipmi_vita_getaddr() [all …]
|
H A D | hpm2.c | 81 req.msg.data_len = sizeof(rq); in hpm2_get_capabilities() 102 if (rsp->data_len < 2 || rsp->data_len > 10) { in hpm2_get_capabilities() 103 lprintf(LOG_NOTICE, "Bad response length, len=%d", rsp->data_len); in hpm2_get_capabilities() 117 if (rsp->data_len < 4) { in hpm2_get_capabilities() 118 lprintf(LOG_NOTICE, "Bad response length, len=%d", rsp->data_len); in hpm2_get_capabilities() 123 memcpy(caps, rsp->data + 2, rsp->data_len - 2); in hpm2_get_capabilities() 142 if (rsp->data_len < 8) { in hpm2_get_capabilities() 143 lprintf(LOG_NOTICE, "Bad response length, len=%d", rsp->data_len); in hpm2_get_capabilities() 168 if (rsp->data_len < 10) { in hpm2_get_capabilities() 169 lprintf(LOG_NOTICE, "Bad response length, len=%d", rsp->data_len); in hpm2_get_capabilities() [all …]
|
/openbmc/openpower-host-ipmi-flash/ |
H A D | hiomap.cpp | 288 ipmi_data_len_t data_len, ipmi_context_t context)>; 437 ipmi_data_len_t data_len, ipmi_context_t context) in hiomap_reset() argument 447 *data_len = 0; in hiomap_reset() 459 ipmi_data_len_t data_len, ipmi_context_t context) in hiomap_get_info() argument 463 if (*data_len < 1) in hiomap_get_info() 489 *data_len = 4; in hiomap_get_info() 501 ipmi_data_len_t data_len, ipmi_context_t context) in hiomap_get_flash_info() argument 518 *data_len = 4; in hiomap_get_flash_info() 530 ipmi_response_t response, ipmi_data_len_t data_len) in hiomap_create_window() argument 532 if (*data_len < 4) in hiomap_create_window() [all …]
|
/openbmc/linux/drivers/nfc/st21nfca/ |
H A D | vendor_cmds.c | 36 size_t data_len) in st21nfca_factory_mode() argument 40 if (data_len != 1) in st21nfca_factory_mode() 60 size_t data_len) in st21nfca_hci_clear_all_pipes() argument 68 size_t data_len) in st21nfca_hci_dm_put_data() argument 74 data_len, NULL); in st21nfca_hci_dm_put_data() 78 size_t data_len) in st21nfca_hci_dm_update_aid() argument 83 ST21NFCA_HCI_DM_UPDATE_AID, data, data_len, NULL); in st21nfca_hci_dm_update_aid() 87 size_t data_len) in st21nfca_hci_dm_get_info() argument 96 data, data_len, &skb); in st21nfca_hci_dm_get_info() 122 size_t data_len) in st21nfca_hci_dm_get_data() argument [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | test_xdp_adjust_tail_grow.c | 8 int data_len = bpf_xdp_get_buff_len(xdp); in _xdp_adjust_tail_grow() local 19 if (data_len == 54) { /* sizeof(pkt_v4) */ in _xdp_adjust_tail_grow() 21 } else if (data_len == 74) { /* sizeof(pkt_v6) */ in _xdp_adjust_tail_grow() 23 } else if (data_len == 64) { in _xdp_adjust_tail_grow() 25 } else if (data_len == 128) { in _xdp_adjust_tail_grow() 27 offset = 4096 - 256 - tailroom - data_len; in _xdp_adjust_tail_grow() 28 } else if (data_len == 9000) { in _xdp_adjust_tail_grow() 30 } else if (data_len == 9001) { in _xdp_adjust_tail_grow()
|
/openbmc/fb-ipmi-oem/src/ |
H A D | transportcommands.cpp | 51 ipmi_data_len_t data_len, ipmi_context_t) in ipmiTransGetSolConfig() argument 59 *data_len = 1; in ipmiTransGetSolConfig() 71 *data_len += 1; in ipmiTransGetSolConfig() 75 *data_len += 1; in ipmiTransGetSolConfig() 79 *data_len += 1; in ipmiTransGetSolConfig() 87 *data_len += 2; in ipmiTransGetSolConfig() 92 *data_len += 2; in ipmiTransGetSolConfig() 97 *data_len += 1; in ipmiTransGetSolConfig() 100 *data_len = 0; in ipmiTransGetSolConfig()
|
/openbmc/u-boot/drivers/mtd/spi/ |
H A D | sf.c | 15 size_t data_len) in spi_flash_read_write() argument 20 if (data_len == 0) in spi_flash_read_write() 27 } else if (data_len != 0) { in spi_flash_read_write() 28 ret = spi_xfer(spi, data_len * 8, data_out, data_in, in spi_flash_read_write() 32 data_len, ret); in spi_flash_read_write() 39 size_t cmd_len, void *data, size_t data_len) in spi_flash_cmd_read() argument 41 return spi_flash_read_write(spi, cmd, cmd_len, NULL, data, data_len); in spi_flash_cmd_read() 50 const void *data, size_t data_len) in spi_flash_cmd_write() argument 52 return spi_flash_read_write(spi, cmd, cmd_len, data, NULL, data_len); in spi_flash_cmd_write()
|
/openbmc/linux/include/linux/can/ |
H A D | length.h | 182 intermission, data_len) \ argument 187 (data_len) * BITS_PER_BYTE + \ 194 intermission, data_len) \ argument 199 (data_len) * BITS_PER_BYTE) + \ 200 ((data_len) <= 16 ? \ 228 intermission, data_len) \ argument 231 intermission, data_len) : \ 233 intermission, data_len) \ 240 #define can_frame_bytes(is_fd, is_eff, bitstuffing, data_len) \ argument 242 true, data_len), \
|
/openbmc/linux/drivers/i3c/master/mipi-i3c-hci/ |
H A D | cmd_v1.c | 149 unsigned int data_len) in fill_data_bytes() argument 152 switch (data_len) { in fill_data_bytes() 179 unsigned int data_len = xfer->data_len; in hci_cmd_v1_prep_ccc() local 196 if (!rnw && data_len <= 4) { in hci_cmd_v1_prep_ccc() 203 CMD_I0_DTT(data_len) | in hci_cmd_v1_prep_ccc() 205 fill_data_bytes(xfer, data, data_len); in hci_cmd_v1_prep_ccc() 216 CMD_R1_DATA_LENGTH(data_len); in hci_cmd_v1_prep_ccc() 230 unsigned int data_len = xfer->data_len; in hci_cmd_v1_prep_i3c_xfer() local 235 if (!rnw && data_len <= 4) { in hci_cmd_v1_prep_i3c_xfer() 241 CMD_I0_DTT(data_len) | in hci_cmd_v1_prep_i3c_xfer() [all …]
|
/openbmc/linux/drivers/usb/gadget/ |
H A D | u_os_desc.h | 97 int data_len) in usb_ext_prop_put_binary() argument 99 put_unaligned_le32(data_len, usb_ext_prop_data_len_ptr(buf, pnl)); in usb_ext_prop_put_binary() 100 memcpy(usb_ext_prop_data_ptr(buf, pnl), data, data_len); in usb_ext_prop_put_binary() 104 int data_len) in usb_ext_prop_put_unicode() argument 107 put_unaligned_le32(data_len, usb_ext_prop_data_len_ptr(buf, pnl)); in usb_ext_prop_put_unicode() 108 result = utf8s_to_utf16s(string, data_len >> 1, UTF16_LITTLE_ENDIAN, in usb_ext_prop_put_unicode() 110 data_len - 2); in usb_ext_prop_put_unicode() 115 &buf[USB_EXT_PROP_B_PROPERTY_DATA + pnl + data_len - 2]); in usb_ext_prop_put_unicode() 117 return data_len; in usb_ext_prop_put_unicode()
|
/openbmc/linux/drivers/nvmem/layouts/ |
H A D | onie-tlv.c | 25 __be16 data_len; member 99 size_t data_len, u8 *data) in onie_tlv_add_cells() argument 112 while (offset < data_len) { in onie_tlv_add_cells() 114 if (offset + tlv.len >= data_len) { in onie_tlv_add_cells() 189 size_t table_len, data_len, hdr_len; in onie_tlv_parse_table() local 202 hdr_len = sizeof(hdr.id) + sizeof(hdr.version) + sizeof(hdr.data_len); in onie_tlv_parse_table() 203 data_len = be16_to_cpu(hdr.data_len); in onie_tlv_parse_table() 204 table_len = hdr_len + data_len; in onie_tlv_parse_table() 222 ret = onie_tlv_add_cells(dev, nvmem, data_len, data); in onie_tlv_parse_table()
|
/openbmc/linux/drivers/nvmem/ |
H A D | brcm_nvram.c | 35 size_t data_len; member 55 if (offset + bytes > priv->data_len) in brcm_nvram_read() 56 to_copy = max_t(ssize_t, (ssize_t)priv->data_len - offset, 0); in brcm_nvram_read() 79 for (priv->data_len = priv->nvmem_size; in brcm_nvram_copy_data() 80 priv->data_len; in brcm_nvram_copy_data() 81 priv->data_len--) { in brcm_nvram_copy_data() 82 if (readb(base + priv->data_len - 1) != priv->padding_byte) in brcm_nvram_copy_data() 85 WARN(priv->data_len > SZ_128K, "Unexpected (big) NVRAM size: %zu B\n", priv->data_len); in brcm_nvram_copy_data() 87 priv->data = devm_kzalloc(priv->dev, priv->data_len, GFP_KERNEL); in brcm_nvram_copy_data() 91 memcpy_fromio(priv->data, base, priv->data_len); in brcm_nvram_copy_data() [all …]
|
/openbmc/ipmitool/src/plugins/bmc/ |
H A D | bmc.c | 141 reqrsp.req.datalength = req->msg.data_len; in ipmi_bmc_send_cmd_ioctl() 142 memcpy(reqrsp.req.data, req->msg.data, req->msg.data_len); in ipmi_bmc_send_cmd_ioctl() 168 rsp.data_len = reqrsp.rsp.datalength; in ipmi_bmc_send_cmd_ioctl() 171 rsp.data_len -= 3; in ipmi_bmc_send_cmd_ioctl() 173 if (!rsp.ccode && (rsp.data_len > 0)) in ipmi_bmc_send_cmd_ioctl() 174 memcpy(rsp.data, reqrsp.rsp.data, rsp.data_len); in ipmi_bmc_send_cmd_ioctl() 193 ((req->msg.data_len > SEND_MAX_PAYLOAD_SIZE) ? in ipmi_bmc_send_cmd_putmsg() 194 (req->msg.data_len - SEND_MAX_PAYLOAD_SIZE) : 0); in ipmi_bmc_send_cmd_putmsg() 206 request->datalength = req->msg.data_len; in ipmi_bmc_send_cmd_putmsg() 207 memcpy(request->data, req->msg.data, req->msg.data_len); in ipmi_bmc_send_cmd_putmsg() [all …]
|
/openbmc/u-boot/drivers/spi/ |
H A D | atcspi200_spi.c | 86 size_t data_len; member 200 unsigned long data_len = bitlen / 8; in __atcspi200_spi_xfer() local 207 cmd_len = ns->cmd_len = data_len; in __atcspi200_spi_xfer() 216 ns->data_len = data_len; in __atcspi200_spi_xfer() 222 ns->data_len = 0; in __atcspi200_spi_xfer() 225 cmd_len = ns->cmd_len = data_len; in __atcspi200_spi_xfer() 228 data_len = 0; in __atcspi200_spi_xfer() 235 data_in, data_len); in __atcspi200_spi_xfer() 236 num_chunks = DIV_ROUND_UP(data_len, max_tran_len); in __atcspi200_spi_xfer() 240 tran_len = min((size_t)data_len, (size_t)max_tran_len); in __atcspi200_spi_xfer() [all …]
|
/openbmc/qemu/hw/core/ |
H A D | generic-loader.c | 58 if (s->data_len) { in generic_loader_reset() 59 assert(s->data_len <= sizeof(s->data)); in generic_loader_reset() 60 dma_memory_write(s->cpu->as, s->addr, &s->data, s->data_len, in generic_loader_reset() 75 if (s->data || s->data_len || s->data_be) { in generic_loader_realize() 85 } else if (!s->data_len) { in generic_loader_realize() 89 } else if (s->data_len > 8) { in generic_loader_realize() 95 if (s->data || s->data_len || s->data_be) { in generic_loader_realize() 108 if (s->data || s->data_len || s->data_be) { in generic_loader_realize() 185 DEFINE_PROP_UINT8("data-len", GenericLoaderState, data_len, 0),
|
/openbmc/linux/drivers/i2c/busses/ |
H A D | i2c-dln2.c | 71 u8 *data, u16 data_len) in dln2_i2c_write() argument 90 tx->buf_len = cpu_to_le16(data_len); in dln2_i2c_write() 91 memcpy(tx->buf, data, data_len); in dln2_i2c_write() 93 len = sizeof(*tx) + data_len - DLN2_I2C_MAX_XFER_SIZE; in dln2_i2c_write() 98 return data_len; in dln2_i2c_write() 102 u16 data_len) in dln2_i2c_read() argument 124 tx.buf_len = cpu_to_le16(data_len); in dln2_i2c_read() 130 if (rx_len < sizeof(rx->buf_len) + data_len) in dln2_i2c_read() 132 if (le16_to_cpu(rx->buf_len) != data_len) in dln2_i2c_read() 135 memcpy(data, rx->buf, data_len); in dln2_i2c_read() [all …]
|