Home
last modified time | relevance | path

Searched refs:max_len (Results 1 – 25 of 110) sorted by relevance

12345

/drivers/firmware/google/
Dvpd_decode.c12 static int vpd_decode_len(const u32 max_len, const u8 *in, in vpd_decode_len() argument
23 if (i >= max_len) in vpd_decode_len()
36 static int vpd_decode_entry(const u32 max_len, const u8 *input_buf, in vpd_decode_entry() argument
42 if (vpd_decode_len(max_len - consumed, &input_buf[consumed], in vpd_decode_entry()
45 if (max_len - consumed < decoded_len) in vpd_decode_entry()
52 if (max_len - consumed < *entry_len) in vpd_decode_entry()
60 int vpd_decode_string(const u32 max_len, const u8 *input_buf, u32 *consumed, in vpd_decode_string() argument
70 if (*consumed >= max_len) in vpd_decode_string()
80 if (vpd_decode_entry(max_len, input_buf, consumed, &key, in vpd_decode_string()
84 if (vpd_decode_entry(max_len, input_buf, consumed, &value, in vpd_decode_string()
Dvpd_decode.h47 int vpd_decode_string(const u32 max_len, const u8 *input_buf, u32 *consumed,
/drivers/staging/rtl8723bs/hal/
Dhal_sdio.c83 u32 deviceId, max_len; in rtw_hal_get_sdio_tx_max_length() local
89 max_len = pHalData->sdio_tx_max_len[HI_QUEUE_IDX]; in rtw_hal_get_sdio_tx_max_length()
93 max_len = pHalData->sdio_tx_max_len[MID_QUEUE_IDX]; in rtw_hal_get_sdio_tx_max_length()
97 max_len = pHalData->sdio_tx_max_len[LOW_QUEUE_IDX]; in rtw_hal_get_sdio_tx_max_length()
101 max_len = pHalData->sdio_tx_max_len[MID_QUEUE_IDX]; in rtw_hal_get_sdio_tx_max_length()
105 return max_len; in rtw_hal_get_sdio_tx_max_length()
/drivers/infiniband/hw/hfi1/
Dmad.c542 u32 port, u32 *resp_len, u32 max_len) in __subn_get_opa_nodedesc() argument
546 if (am || smp_length_check(sizeof(*nd), max_len)) { in __subn_get_opa_nodedesc()
563 u32 *resp_len, u32 max_len) in __subn_get_opa_nodeinfo() argument
573 smp_length_check(sizeof(*ni), max_len) || in __subn_get_opa_nodeinfo()
756 u32 *resp_len, u32 max_len) in __subn_get_opa_portinfo() argument
772 if (num_ports != 1 || smp_length_check(sizeof(*pi), max_len)) { in __subn_get_opa_portinfo()
981 u32 *resp_len, u32 max_len) in __subn_get_opa_pkeytable() argument
1004 if (smp_length_check(size, max_len)) { in __subn_get_opa_pkeytable()
1311 u32 *resp_len, u32 max_len, int local_mad) in __subn_set_opa_portinfo() argument
1333 smp_length_check(sizeof(*pi), max_len)) { in __subn_set_opa_portinfo()
[all …]
/drivers/crypto/qce/
Ddma.c51 unsigned int max_len) in qce_sgtable_add() argument
65 while (new_sgl && sg && max_len) { in qce_sgtable_add()
66 new_len = new_sgl->length > max_len ? max_len : new_sgl->length; in qce_sgtable_add()
71 max_len -= new_len; in qce_sgtable_add()
Ddma.h46 unsigned int max_len);
/drivers/net/wireless/intel/iwlwifi/fw/
Dpnvm.h22 u8 *pnvm_name, size_t max_len) in iwl_pnvm_get_fs_name() argument
30 snprintf(pnvm_name, max_len, "%spnvm", trans->cfg->fw_name_pre); in iwl_pnvm_get_fs_name()
34 if (pre_len < max_len && pre_len > 0) in iwl_pnvm_get_fs_name()
/drivers/video/fbdev/core/
Dfbcon.h115 __u32 max_len; in mono_col() local
116 max_len = max(info->var.green.length, info->var.red.length); in mono_col()
117 max_len = max(info->var.blue.length, max_len); in mono_col()
118 return (~(0xfff << max_len)) & 0xff; in mono_col()
/drivers/net/ethernet/netronome/nfp/
Dccm_mbox.c49 unsigned int max_len; member
62 nfp_ccm_mbox_msg_init(struct sk_buff *skb, unsigned int exp_reply, int max_len) in nfp_ccm_mbox_msg_init() argument
68 cb->max_len = max_len; in nfp_ccm_mbox_msg_init()
77 return cb->max_len; in nfp_ccm_mbox_maxlen()
291 if (length > cb->max_len) { in nfp_ccm_mbox_copy_out()
293 hdr.type, cb->max_len, length); in nfp_ccm_mbox_copy_out()
470 unsigned int max_len; in nfp_ccm_mbox_msg_prepare() local
503 max_len = max(max_reply_size, round_up(skb->len, 4)); in nfp_ccm_mbox_msg_prepare()
504 if (max_len > mbox_max) { in nfp_ccm_mbox_msg_prepare()
511 nfp_ccm_mbox_msg_init(skb, reply_size, max_len); in nfp_ccm_mbox_msg_prepare()
/drivers/net/wireless/ath/carl9170/
Dfw.c40 const struct carl9170fw_desc_head *head, unsigned int max_len) in carl9170_fw_verify_descs() argument
46 if (max_len < sizeof(*pos)) in carl9170_fw_verify_descs()
49 max_len = min_t(unsigned int, CARL9170FW_DESC_MAX_LENGTH, max_len); in carl9170_fw_verify_descs()
53 end_addr = pos_addr + max_len; in carl9170_fw_verify_descs()
64 if (pos_length > max_len) in carl9170_fw_verify_descs()
77 max_len -= pos_length; in carl9170_fw_verify_descs()
Ddebug.c491 int i, max_len, err; \
493 max_len = ARRAY_SIZE(name##_regs) * 80; \
494 buf = vmalloc(max_len); \
507 ADD(buf, *ret, max_len, "%22s = %" f "[+%" f "]\n", \
521 int i, max_len, err; \
523 max_len = ARRAY_SIZE(name##_regs) * 80; \
524 buf = vmalloc(max_len); \
535 ADD(buf, *ret, max_len, "%22s = %" f "\n", \
547 int err = 0, i, n = 0, max_len = 32, res; in carl9170_debugfs_hw_ioread32_write() local
553 if (count > max_len) in carl9170_debugfs_hw_ioread32_write()
[all …]
/drivers/net/dsa/sja1105/
Dsja1105_devlink.c43 size_t max_len, len; in sja1105_region_static_config_snapshot() local
46 max_len = sja1105_static_config_get_max_size(priv); in sja1105_region_static_config_snapshot()
48 *data = kcalloc(max_len, sizeof(u8), GFP_KERNEL); in sja1105_region_static_config_snapshot()
/drivers/dma/
Dbcm2835-dma.c183 size_t max_len) in bcm2835_dma_frames_for_length() argument
185 return DIV_ROUND_UP(len, max_len); in bcm2835_dma_frames_for_length()
229 size_t max_len = bcm2835_dma_max_frame_length(chan); in bcm2835_dma_create_cb_set_length() local
232 control_block->length = min_t(u32, len, max_len); in bcm2835_dma_create_cb_set_length()
391 size_t len, max_len; in bcm2835_dma_fill_cb_chain_with_sg() local
396 max_len = bcm2835_dma_max_frame_length(c); in bcm2835_dma_fill_cb_chain_with_sg()
405 cb->cb->length = min(len, max_len); in bcm2835_dma_fill_cb_chain_with_sg()
620 size_t max_len = bcm2835_dma_max_frame_length(c); in bcm2835_dma_prep_dma_memcpy() local
628 frames = bcm2835_dma_frames_for_length(len, max_len); in bcm2835_dma_prep_dma_memcpy()
703 size_t max_len = bcm2835_dma_max_frame_length(c); in bcm2835_dma_prep_dma_cyclic() local
[all …]
/drivers/net/ethernet/intel/ixgb/
Dixgb_ethtool.c355 int i, max_len, first_word, last_word; in ixgb_get_eeprom() local
365 max_len = ixgb_get_eeprom_len(netdev); in ixgb_get_eeprom()
372 if ((eeprom->offset + eeprom->len) > max_len) in ixgb_get_eeprom()
373 eeprom->len = (max_len - eeprom->offset); in ixgb_get_eeprom()
403 int max_len, first_word, last_word; in ixgb_set_eeprom() local
412 max_len = ixgb_get_eeprom_len(netdev); in ixgb_set_eeprom()
417 if ((eeprom->offset + eeprom->len) > max_len) in ixgb_set_eeprom()
418 eeprom->len = (max_len - eeprom->offset); in ixgb_set_eeprom()
422 eeprom_buff = kmalloc(max_len, GFP_KERNEL); in ixgb_set_eeprom()
/drivers/mmc/host/
Dsdhci-omap.c301 u32 length = 0, max_len = 0; in sdhci_omap_execute_tuning() local
366 if (length > max_len) { in sdhci_omap_execute_tuning()
368 max_len = length; in sdhci_omap_execute_tuning()
375 if (!max_len) { in sdhci_omap_execute_tuning()
386 phase_delay = min(max_window + 4 * (max_len - 1) - 24, in sdhci_omap_execute_tuning()
388 DIV_ROUND_UP(13 * max_len, 16) * 4); in sdhci_omap_execute_tuning()
390 phase_delay = max_window + DIV_ROUND_UP(9 * max_len, 16) * 4; in sdhci_omap_execute_tuning()
392 phase_delay = max_window + DIV_ROUND_UP(8 * max_len, 16) * 4; in sdhci_omap_execute_tuning()
394 phase_delay = max_window + DIV_ROUND_UP(7 * max_len, 16) * 4; in sdhci_omap_execute_tuning()
396 phase_delay = max_window + DIV_ROUND_UP(5 * max_len, 16) * 4; in sdhci_omap_execute_tuning()
[all …]
Dmmci_stm32_sdmmc.c422 int cur_len = 0, max_len = 0, end_of_len = 0; in sdmmc_dlyb_phase_tuning() local
432 if (cur_len > max_len) { in sdmmc_dlyb_phase_tuning()
433 max_len = cur_len; in sdmmc_dlyb_phase_tuning()
439 if (!max_len) { in sdmmc_dlyb_phase_tuning()
446 phase = end_of_len - max_len / 2; in sdmmc_dlyb_phase_tuning()
/drivers/firmware/arm_scmi/
Dmsg.c104 size_t max_len, struct scmi_xfer *xfer) in msg_fetch_notification() argument
106 xfer->rx.len = min_t(size_t, max_len, in msg_fetch_notification()
Dshmem.c72 size_t max_len, struct scmi_xfer *xfer) in shmem_fetch_notification() argument
77 xfer->rx.len = min_t(size_t, max_len, len > 4 ? len - 4 : 0); in shmem_fetch_notification()
Dcommon.h381 size_t max_len, struct scmi_xfer *xfer);
438 size_t max_len, struct scmi_xfer *xfer);
457 size_t max_len, struct scmi_xfer *xfer);
Dmailbox.c218 size_t max_len, struct scmi_xfer *xfer) in mailbox_fetch_notification() argument
222 shmem_fetch_notification(smbox->shmem, max_len, xfer); in mailbox_fetch_notification()
/drivers/i3c/master/mipi-i3c-hci/
Dpio.c114 unsigned int max_len; member
122 unsigned int max_len; member
843 ibi->max_len = dev_ibi->max_len; in hci_pio_prep_new_ibi()
845 if (ibi->seg_len > ibi->max_len) { in hci_pio_prep_new_ibi()
847 ibi->seg_len, ibi->max_len); in hci_pio_prep_new_ibi()
930 if (ibi->slot && ibi->slot->len + ibi->seg_len > ibi->max_len) { in hci_pio_process_ibi()
933 ibi->slot->len + ibi->seg_len, ibi->max_len); in hci_pio_process_ibi()
957 dev_ibi->max_len = req->max_payload_len; in hci_pio_request_ibi()
/drivers/net/ethernet/sfc/
Drx.c48 unsigned max_len = rx_buf->len - efx->type->rx_buffer_padding; in efx_rx_packet__check_len() local
50 if (likely(len <= max_len)) in efx_rx_packet__check_len()
61 efx_rx_queue_index(rx_queue), len, max_len); in efx_rx_packet__check_len()
/drivers/spi/
Dspi-ti-qspi.c582 size_t max_len; in ti_qspi_adjust_op_size() local
588 max_len = qspi->mmap_size - op->addr.val; in ti_qspi_adjust_op_size()
590 max_len); in ti_qspi_adjust_op_size()
598 max_len = QSPI_FRAME; in ti_qspi_adjust_op_size()
599 max_len -= 1 + op->addr.nbytes + op->dummy.nbytes; in ti_qspi_adjust_op_size()
601 max_len); in ti_qspi_adjust_op_size()
/drivers/media/tuners/
Dtuner-xc2028.c549 if (priv->ctrl.max_len > sizeof(buf)) in load_firmware()
550 priv->ctrl.max_len = sizeof(buf); in load_firmware()
628 int len = (size < priv->ctrl.max_len - 1) ? in load_firmware()
629 size : priv->ctrl.max_len - 1; in load_firmware()
1406 if (priv->ctrl.max_len < 9) in xc2028_set_config()
1407 priv->ctrl.max_len = 13; in xc2028_set_config()
1485 priv->ctrl.max_len = 13; in xc2028_attach()
Dtuner-xc2028.h36 int max_len; member

12345