| /linux/tools/perf/ui/tui/ |
| H A D | util.c | 79 int max_len = 60, nr_lines = 0; in ui_browser__input_window() local 90 if (max_len < len) in ui_browser__input_window() 91 max_len = len; in ui_browser__input_window() 100 max_len += 2; in ui_browser__input_window() 103 x = SLtt_Screen_Cols / 2 - max_len / 2; in ui_browser__input_window() 106 SLsmg_draw_box(y, x++, nr_lines, max_len); in ui_browser__input_window() 113 max_len -= 2; in ui_browser__input_window() 115 nr_lines, max_len, 1); in ui_browser__input_window() 120 SLsmg_write_nstring(" ", max_len); in ui_browser__input_window() 122 SLsmg_draw_box(y++, x + 1, 3, max_len - 2); in ui_browser__input_window() [all …]
|
| /linux/drivers/firmware/google/ |
| H A D | vpd_decode.c | 12 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()
|
| /linux/fs/ntfs3/ |
| H A D | lznt.c | 32 size_t max_len; member 39 size_t max_len) in get_match_len() argument 43 while (ptr + len < end && ptr[len] == prev[len] && ++len < max_len) in get_match_len() 63 if (ctx->max_len > 3) in longest_match_std() 65 hash[0] + 3, ctx->max_len - 3); in longest_match_std() 71 if (ctx->max_len > 3) in longest_match_std() 73 hash[1] + 3, ctx->max_len - 3); in longest_match_std() 91 size_t max_len; in longest_match_best() local 94 if (ctx->unc >= src || !ctx->max_len) in longest_match_best() 97 max_len = 0; in longest_match_best() [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | test_get_stack_rawtp.c | 60 int max_len, max_buildid_len, total_size; in bpf_prog1() local 70 max_len = MAX_STACK_RAWTP * sizeof(__u64); in bpf_prog1() 74 max_len, 0); in bpf_prog1() 75 data->user_stack_size = bpf_get_stack(ctx, data->user_stack, max_len, in bpf_prog1() 87 usize = bpf_get_stack(ctx, raw_data, max_len, BPF_F_USER_STACK); in bpf_prog1() 91 ksize = bpf_get_stack(ctx, raw_data + usize, max_len - usize, 0); in bpf_prog1() 96 if (total_size > 0 && total_size <= max_len) in bpf_prog1()
|
| H A D | stacktrace_map_skip.c | 38 __u32 max_len = TEST_STACK_DEPTH * sizeof(__u64); in oncpu() local 55 bpf_get_stack(ctx, stack_p, max_len, TEST_STACK_DEPTH); in oncpu()
|
| /linux/drivers/net/ethernet/intel/libeth/ |
| H A D | rx.c | 21 static u32 libeth_rx_hw_len_mtu(const struct page_pool_params *pp, u32 max_len) in libeth_rx_hw_len_mtu() argument 27 len = min3(len, ALIGN_DOWN(max_len ? : U32_MAX, LIBETH_RX_BUF_STRIDE), in libeth_rx_hw_len_mtu() 28 pp->max_len); in libeth_rx_hw_len_mtu() 44 u32 max_len, u32 truesize) in libeth_rx_hw_len_truesize() argument 54 len = min3(len, ALIGN_DOWN(max_len ? : U32_MAX, LIBETH_RX_BUF_STRIDE), in libeth_rx_hw_len_truesize() 55 pp->max_len); in libeth_rx_hw_len_truesize() 77 pp->max_len = LIBETH_RX_PAGE_LEN(pp->offset); in libeth_rx_page_pool_params() 122 pp->max_len = PAGE_SIZE << LIBETH_RX_PAGE_ORDER; in libeth_rx_page_pool_params_zc() 137 pp->max_len); in libeth_rx_page_pool_params_zc()
|
| /linux/drivers/crypto/qce/ |
| H A D | dma.c | 57 unsigned int max_len) in qce_sgtable_add() argument 71 while (new_sgl && sg && max_len) { in qce_sgtable_add() 72 new_len = new_sgl->length > max_len ? max_len : new_sgl->length; in qce_sgtable_add() 77 max_len -= new_len; in qce_sgtable_add()
|
| /linux/net/x25/ |
| H A D | x25_out.c | 56 int max_len = x25_pacsize_to_bytes(x25->facilities.pacsize_out); in x25_output() local 58 if (skb->len - header_len > max_len) { in x25_output() 67 skbn = sock_alloc_send_skb(sk, frontlen + max_len, in x25_output() 83 len = max_len > skb->len ? skb->len : max_len; in x25_output()
|
| /linux/fs/isofs/ |
| H A D | export.c | 121 int *max_len, in isofs_export_encode_fh() argument 125 int len = *max_len; in isofs_export_encode_fh() 136 *max_len = 5; in isofs_export_encode_fh() 139 *max_len = 3; in isofs_export_encode_fh() 157 *max_len = len; in isofs_export_encode_fh()
|
| /linux/fs/btrfs/ |
| H A D | export.c | 18 static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len, in btrfs_encode_fh() argument 22 int len = *max_len; in btrfs_encode_fh() 28 *max_len = BTRFS_FID_SIZE_CONNECTABLE_ROOT; in btrfs_encode_fh() 30 *max_len = BTRFS_FID_SIZE_CONNECTABLE; in btrfs_encode_fh() 33 *max_len = BTRFS_FID_SIZE_NON_CONNECTABLE; in btrfs_encode_fh() 52 if (*max_len < BTRFS_FID_SIZE_CONNECTABLE_ROOT) in btrfs_encode_fh() 63 *max_len = len; in btrfs_encode_fh()
|
| /linux/fs/ceph/ |
| H A D | export.c | 44 static int ceph_encode_snapfh(struct inode *inode, u32 *rawfh, int *max_len, in ceph_encode_snapfh() argument 54 if (*max_len < snap_handle_length) { in ceph_encode_snapfh() 55 *max_len = snap_handle_length; in ceph_encode_snapfh() 87 *max_len = snap_handle_length; in ceph_encode_snapfh() 94 static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len, in ceph_encode_fh() argument 103 return ceph_encode_snapfh(inode, rawfh, max_len, parent_inode); in ceph_encode_fh() 105 if (parent_inode && (*max_len < connected_handle_length)) { in ceph_encode_fh() 106 *max_len = connected_handle_length; in ceph_encode_fh() 108 } else if (*max_len < handle_length) { in ceph_encode_fh() 109 *max_len = handle_length; in ceph_encode_fh() [all …]
|
| /linux/arch/m68k/amiga/ |
| H A D | pcmcia.c | 40 int pcmcia_copy_tuple(unsigned char tuple_id, void *tuple, int max_len) in pcmcia_copy_tuple() argument 53 len = (len > max_len)?max_len:len; in pcmcia_copy_tuple()
|
| /linux/drivers/net/ethernet/netronome/nfp/ |
| H A D | ccm_mbox.c | 49 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()
|
| /linux/drivers/net/wireless/intel/iwlwifi/fw/ |
| H A D | pnvm.h | 22 u8 *pnvm_name, size_t max_len) in iwl_pnvm_get_fs_name() argument 26 snprintf(pnvm_name, max_len, "%s.pnvm", in iwl_pnvm_get_fs_name()
|
| /linux/drivers/net/wireless/ath/carl9170/ |
| H A D | fw.c | 40 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()
|
| H A D | debug.c | 487 int i, max_len, err; \ 489 max_len = ARRAY_SIZE(name##_regs) * 80; \ 490 buf = vmalloc(max_len); \ 503 ADD(buf, *ret, max_len, "%22s = %" f "[+%" f "]\n", \ 517 int i, max_len, err; \ 519 max_len = ARRAY_SIZE(name##_regs) * 80; \ 520 buf = vmalloc(max_len); \ 531 ADD(buf, *ret, max_len, "%22s = %" f "\n", \ 543 int err = 0, i, n = 0, max_len = 32, res; in carl9170_debugfs_hw_ioread32_write() local 549 if (count > max_len) in carl9170_debugfs_hw_ioread32_write() [all …]
|
| /linux/io_uring/ |
| H A D | kbuf.c | 271 arg->max_len = min_t(size_t, arg->max_len, MAX_RW_COUNT); in io_ring_buffers_peek() 274 if (arg->max_len) { in io_ring_buffers_peek() 280 needed = (arg->max_len + len - 1) / len; in io_ring_buffers_peek() 290 if (arg->mode & KBUF_MODE_EXPAND && nr_avail > nr_iovs && arg->max_len) { in io_ring_buffers_peek() 301 if (!arg->max_len) in io_ring_buffers_peek() 302 arg->max_len = MAX_RW_COUNT; in io_ring_buffers_peek() 309 if (len > arg->max_len) { in io_ring_buffers_peek() 310 len = arg->max_len; in io_ring_buffers_peek() 328 arg->max_len -= len; in io_ring_buffers_peek() 329 if (!arg->max_len) in io_ring_buffers_peek() [all …]
|
| /linux/drivers/pci/ |
| H A D | vpd.c | 159 unsigned int max_len; in pci_vpd_read() local 170 max_len = check_size ? vpd->len : PCI_VPD_MAX_SIZE; in pci_vpd_read() 172 if (pos >= max_len) in pci_vpd_read() 175 if (end > max_len) { in pci_vpd_read() 176 end = max_len; in pci_vpd_read() 223 unsigned int max_len; in pci_vpd_write() local 234 max_len = check_size ? vpd->len : PCI_VPD_MAX_SIZE; in pci_vpd_write() 236 if (end > max_len) in pci_vpd_write()
|
| /linux/drivers/net/dsa/sja1105/ |
| H A D | sja1105_devlink.c | 43 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()
|
| /linux/tools/lib/python/kdoc/ |
| H A D | python_version.py | 56 def cmd_print(cmd, max_len=80): 67 if not max_len or len(cmd_line[-1]) + len(w) < max_len: 50 cmd_print(cmd, max_len=80) global() argument
|
| /linux/tools/testing/selftests/sched_ext/ |
| H A D | util.c | 14 static ssize_t read_text(const char *path, char *buf, size_t max_len) in read_text() argument 23 len = read(fd, buf, max_len - 1); in read_text()
|
| /linux/net/sunrpc/xprtrdma/ |
| H A D | svc_rdma_pcl.c | 251 unsigned int max_len, bound, total_read; in pcl_check_read_chunk_positions() local 254 max_len = rctxt->rc_maxpages << PAGE_SHIFT; in pcl_check_read_chunk_positions() 258 if (chunk->ch_length > max_len) in pcl_check_read_chunk_positions() 272 if (chunk->ch_length > max_len) in pcl_check_read_chunk_positions()
|
| /linux/drivers/dma/ |
| H A D | bcm2835-dma.c | 183 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() 374 size_t len, max_len; in bcm2835_dma_fill_cb_chain_with_sg() local 379 max_len = bcm2835_dma_max_frame_length(c); in bcm2835_dma_fill_cb_chain_with_sg() 388 cb->cb->length = min(len, max_len); in bcm2835_dma_fill_cb_chain_with_sg() 603 size_t max_len = bcm2835_dma_max_frame_length(c); in bcm2835_dma_prep_dma_memcpy() local 611 frames = bcm2835_dma_frames_for_length(len, max_len); in bcm2835_dma_prep_dma_memcpy() 686 size_t max_len = bcm2835_dma_max_frame_length(c); in bcm2835_dma_prep_dma_cyclic() local [all …]
|
| /linux/include/linux/platform_data/x86/ |
| H A D | simatic-ipc.h | 43 static inline u32 simatic_ipc_get_station_id(u8 *data, int max_len) in simatic_ipc_get_station_id() argument 54 while ((u8 *)data_entry < data + max_len) { in simatic_ipc_get_station_id()
|
| /linux/drivers/i2c/busses/ |
| H A D | i2c-cgbc.c | 208 int ret, max_len, len, i; in cgbc_i2c_xfer_msg() local 233 max_len = (i2c->state == CGBC_I2C_STATE_READ) ? in cgbc_i2c_xfer_msg() 236 if (msg->len - i2c->pos > max_len) { in cgbc_i2c_xfer_msg() 237 len = max_len; in cgbc_i2c_xfer_msg() 261 if (i2c->nmsgs > 1 || msg->len - i2c->pos > max_len) in cgbc_i2c_xfer_msg()
|