Home
last modified time | relevance | path

Searched refs:bufsize (Results 1 – 25 of 246) sorted by relevance

12345678910

/linux-6.6.21/lib/
Dkunit_iov_iter.c75 void *buffer, size_t bufsize, in iov_kunit_load_kvec() argument
85 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_load_kvec()
90 KUNIT_ASSERT_LE(test, size, bufsize); in iov_kunit_load_kvec()
105 size_t bufsize, npages, size, copied; in iov_kunit_copy_to_kvec() local
108 bufsize = 0x100000; in iov_kunit_copy_to_kvec()
109 npages = bufsize / PAGE_SIZE; in iov_kunit_copy_to_kvec()
112 for (i = 0; i < bufsize; i++) in iov_kunit_copy_to_kvec()
116 memset(buffer, 0, bufsize); in iov_kunit_copy_to_kvec()
119 buffer, bufsize, kvec_test_ranges); in iov_kunit_copy_to_kvec()
130 memset(scratch, 0, bufsize); in iov_kunit_copy_to_kvec()
[all …]
Doid_registry.c130 int sprint_oid(const void *data, size_t datasize, char *buffer, size_t bufsize) in sprint_oid() argument
142 ret = count = snprintf(buffer, bufsize, "%u.%u", n / 40, n % 40); in sprint_oid()
143 if (count >= bufsize) in sprint_oid()
146 bufsize -= count; in sprint_oid()
162 ret += count = snprintf(buffer, bufsize, ".%lu", num); in sprint_oid()
163 if (count >= bufsize) in sprint_oid()
166 bufsize -= count; in sprint_oid()
172 snprintf(buffer, bufsize, "(bad)"); in sprint_oid()
186 int sprint_OID(enum OID oid, char *buffer, size_t bufsize) in sprint_OID() argument
194 buffer, bufsize); in sprint_OID()
Dtest_printf.c46 do_test(int bufsize, const char *expect, int elen, in do_test() argument
56 ret = vsnprintf(test_buffer, bufsize, fmt, aq); in do_test()
61 bufsize, fmt, ret, elen); in do_test()
66 pr_warn("vsnprintf(buf, %d, \"%s\", ...) wrote before buffer\n", bufsize, fmt); in do_test()
70 if (!bufsize) { in do_test()
79 written = min(bufsize-1, elen); in do_test()
82 bufsize, fmt); in do_test()
86 if (memchr_inv(test_buffer + written + 1, FILL_CHAR, bufsize - (written + 1))) { in do_test()
88 bufsize, fmt); in do_test()
92 if (memchr_inv(test_buffer + bufsize, FILL_CHAR, BUF_SIZE + PAD_SIZE - bufsize)) { in do_test()
[all …]
/linux-6.6.21/drivers/sbus/char/
Dopenprom.c62 unsigned int bufsize; in copyin() local
67 if (get_user(bufsize, &info->oprom_size)) in copyin()
70 if (bufsize == 0) in copyin()
76 if (bufsize > OPROMMAXPARAM) in copyin()
77 bufsize = OPROMMAXPARAM; in copyin()
79 if (!(*opp_p = kzalloc(sizeof(int) + bufsize + 1, GFP_KERNEL))) in copyin()
83 &info->oprom_array, bufsize)) { in copyin()
87 return bufsize; in copyin()
92 int n, bufsize; in getstrings() local
103 n = bufsize = 0; in getstrings()
[all …]
/linux-6.6.21/samples/bpf/
Dtcp_bufs_kern.c28 int bufsize = 1500000; in bpf_bufs() local
57 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_bufs()
58 sizeof(bufsize)); in bpf_bufs()
60 &bufsize, sizeof(bufsize)); in bpf_bufs()
67 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_bufs()
68 sizeof(bufsize)); in bpf_bufs()
70 &bufsize, sizeof(bufsize)); in bpf_bufs()
Dtcp_iw_kern.c28 int bufsize = 1500000; in bpf_iw() local
58 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_iw()
59 sizeof(bufsize)); in bpf_iw()
61 &bufsize, sizeof(bufsize)); in bpf_iw()
69 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_iw()
70 sizeof(bufsize)); in bpf_iw()
72 &bufsize, sizeof(bufsize)); in bpf_iw()
Dtcp_clamp_kern.c28 int bufsize = 150000; in bpf_clamp() local
63 &bufsize, sizeof(bufsize)); in bpf_clamp()
65 SO_RCVBUF, &bufsize, in bpf_clamp()
66 sizeof(bufsize)); in bpf_clamp()
79 SO_SNDBUF, &bufsize, in bpf_clamp()
80 sizeof(bufsize)); in bpf_clamp()
82 SO_RCVBUF, &bufsize, in bpf_clamp()
83 sizeof(bufsize)); in bpf_clamp()
/linux-6.6.21/drivers/net/wireless/ath/carl9170/
Ddebug.c54 char *(*read)(struct ar9170 *ar, char *buf, size_t bufsize,
217 size_t bufsize, ssize_t *len) in carl9170_debugfs_mem_usage_read() argument
221 ADD(buf, *len, bufsize, "jar: [%*pb]\n", in carl9170_debugfs_mem_usage_read()
224 ADD(buf, *len, bufsize, "cookies: used:%3d / total:%3d, allocs:%d\n", in carl9170_debugfs_mem_usage_read()
228 ADD(buf, *len, bufsize, "memory: free:%3d (%3d KiB) / total:%3d KiB)\n", in carl9170_debugfs_mem_usage_read()
240 size_t bufsize, ssize_t *len) in carl9170_debugfs_qos_stat_read() argument
242 ADD(buf, *len, bufsize, "%s QoS AC\n", modparam_noht ? "Hardware" : in carl9170_debugfs_qos_stat_read()
245 ADD(buf, *len, bufsize, "[ VO VI " in carl9170_debugfs_qos_stat_read()
249 ADD(buf, *len, bufsize, "[length/limit length/limit " in carl9170_debugfs_qos_stat_read()
258 ADD(buf, *len, bufsize, "[ total total " in carl9170_debugfs_qos_stat_read()
[all …]
/linux-6.6.21/drivers/s390/char/
Dvmcp.c32 unsigned int bufsize; member
65 order = get_order(session->bufsize); in vmcp_response_alloc()
66 nr_pages = ALIGN(session->bufsize, PAGE_SIZE) >> PAGE_SHIFT; in vmcp_response_alloc()
89 order = get_order(session->bufsize); in vmcp_response_free()
90 nr_pages = ALIGN(session->bufsize, PAGE_SIZE) >> PAGE_SHIFT; in vmcp_response_free()
112 session->bufsize = PAGE_SIZE; in vmcp_open()
145 size = min_t(size_t, session->resp_size, session->bufsize); in vmcp_read()
179 session->resp_size = cpcmd(cmd, session->response, session->bufsize, in vmcp_write()
219 ret = get_user(session->bufsize, argp); in vmcp_ioctl()
221 session->bufsize = PAGE_SIZE; in vmcp_ioctl()
[all …]
/linux-6.6.21/sound/soc/sof/intel/
Dhda-loader-skl.c272 unsigned int bufsize = HDA_SKL_CLDMA_MAX_BUFFER_SIZE; in cl_stream_prepare_skl() local
277 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, sdev->dev, bufsize, dmab); in cl_stream_prepare_skl()
283 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, sdev->dev, bufsize, dmab_bdl); in cl_stream_prepare_skl()
291 frags = cl_skl_cldma_setup_bdle(sdev, dmab, &bdl, bufsize, 1); in cl_stream_prepare_skl()
292 cl_skl_cldma_setup_controller(sdev, dmab_bdl, bufsize, frags); in cl_stream_prepare_skl()
392 unsigned int bufsize, in cl_skl_cldma_fill_buffer() argument
400 unsigned int size = (bufsize == copysize) ? bufsize : copysize; in cl_skl_cldma_fill_buffer()
456 u32 total_size, u32 bufsize) in cl_skl_cldma_copy_to_buf() argument
466 if (bytes_left > bufsize) { in cl_skl_cldma_copy_to_buf()
467 dev_dbg(sdev->dev, "cldma copy %#x bytes\n", bufsize); in cl_skl_cldma_copy_to_buf()
[all …]
/linux-6.6.21/drivers/mtd/tests/
Dpagetest.c35 static int bufsize; variable
68 err = mtdtest_read(mtd, addr0, bufsize, twopages); in verify_eraseblock()
71 err = mtdtest_read(mtd, addrn - bufsize, bufsize, twopages); in verify_eraseblock()
74 memset(twopages, 0, bufsize); in verify_eraseblock()
75 err = mtdtest_read(mtd, addr, bufsize, twopages); in verify_eraseblock()
78 if (memcmp(twopages, writebuf + (j * pgsize), bufsize)) { in verify_eraseblock()
89 err = mtdtest_read(mtd, addr0, bufsize, twopages); in verify_eraseblock()
92 err = mtdtest_read(mtd, addrn - bufsize, bufsize, twopages); in verify_eraseblock()
95 memset(twopages, 0, bufsize); in verify_eraseblock()
96 err = mtdtest_read(mtd, addr, bufsize, twopages); in verify_eraseblock()
[all …]
Dstresstest.c39 static int bufsize; variable
57 return get_random_u32_below(bufsize); in rand_offs()
62 return get_random_u32_below(bufsize - offs); in rand_len()
176 bufsize = mtd->erasesize * 2; in mtd_stresstest_init()
179 readbuf = vmalloc(bufsize); in mtd_stresstest_init()
180 writebuf = vmalloc(bufsize); in mtd_stresstest_init()
186 get_random_bytes(writebuf, bufsize); in mtd_stresstest_init()
/linux-6.6.21/scripts/dtc/libfdt/
Dfdt_sw.c109 int fdt_create_with_flags(void *buf, int bufsize, uint32_t flags) in fdt_create_with_flags() argument
115 if (bufsize < hdrsize) in fdt_create_with_flags()
121 memset(buf, 0, bufsize); in fdt_create_with_flags()
134 fdt_set_totalsize(fdt, bufsize); in fdt_create_with_flags()
143 int fdt_create(void *buf, int bufsize) in fdt_create() argument
145 return fdt_create_with_flags(buf, bufsize, 0); in fdt_create()
148 int fdt_resize(void *fdt, void *buf, int bufsize) in fdt_resize() argument
155 if (bufsize < 0) in fdt_resize()
165 if ((headsize + tailsize) > (unsigned)bufsize) in fdt_resize()
169 newtail = (char *)buf + bufsize - tailsize; in fdt_resize()
[all …]
Dfdt_empty_tree.c13 int fdt_create_empty_tree(void *buf, int bufsize) in fdt_create_empty_tree() argument
17 err = fdt_create(buf, bufsize); in fdt_create_empty_tree()
37 return fdt_open_into(buf, buf, bufsize); in fdt_create_empty_tree()
/linux-6.6.21/sound/soc/intel/skylake/
Dskl-sst-cldma.c83 int remaining = ctx->cl_dev.bufsize; in skl_cldma_setup_bdle()
206 if (ctx->cl_dev.dma_buffer_offset + size > ctx->cl_dev.bufsize) { in skl_cldma_fill_buffer()
207 unsigned int size_b = ctx->cl_dev.bufsize - in skl_cldma_fill_buffer()
219 if (ctx->cl_dev.curr_spib_pos == ctx->cl_dev.bufsize) in skl_cldma_fill_buffer()
266 if (bytes_left > ctx->cl_dev.bufsize) { in skl_cldma_copy_to_buf()
273 ctx->cl_dev.curr_spib_pos = ctx->cl_dev.bufsize; in skl_cldma_copy_to_buf()
275 size = ctx->cl_dev.bufsize; in skl_cldma_copy_to_buf()
290 <= ctx->cl_dev.bufsize) { in skl_cldma_copy_to_buf()
294 (ctx->cl_dev.bufsize - in skl_cldma_copy_to_buf()
333 ctx->cl_dev.bufsize = SKL_MAX_BUFFER_SIZE; in skl_cldma_prepare()
[all …]
/linux-6.6.21/drivers/net/wireless/broadcom/b43legacy/
Ddebugfs.c32 ssize_t (*read)(struct b43legacy_wldev *dev, char *buf, size_t bufsize);
56 if (bufsize - count) \
58 bufsize - count, \
66 static ssize_t tsf_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize) in tsf_read_file() argument
92 static ssize_t ucode_regs_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize) in ucode_regs_read_file() argument
106 static ssize_t shm_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize) in shm_read_file() argument
114 if (bufsize < sizeof(tmp)) in shm_read_file()
119 bufsize -= sizeof(tmp); in shm_read_file()
125 static ssize_t txstat_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize) in txstat_read_file() argument
195 const size_t bufsize = 1024 * 16; /* 16 KiB buffer */ in b43legacy_debugfs_read() local
[all …]
/linux-6.6.21/arch/powerpc/platforms/pseries/
Dreconfig.c194 static int do_add_node(char *buf, size_t bufsize) in do_add_node() argument
202 end = buf + bufsize; in do_add_node()
252 static char *parse_node(char *buf, size_t bufsize, struct device_node **npp) in parse_node() argument
272 static int do_add_property(char *buf, size_t bufsize) in do_add_property() argument
279 end = buf + bufsize; in do_add_property()
280 buf = parse_node(buf, bufsize, &np); in do_add_property()
297 static int do_remove_property(char *buf, size_t bufsize) in do_remove_property() argument
301 buf = parse_node(buf, bufsize, &np); in do_remove_property()
316 static int do_update_property(char *buf, size_t bufsize) in do_update_property() argument
323 buf = parse_node(buf, bufsize, &np); in do_update_property()
[all …]
/linux-6.6.21/arch/x86/lib/
Dcmdline.c124 const char *option, char *buffer, int bufsize) in __cmdline_find_option() argument
193 if (++len < bufsize) in __cmdline_find_option()
200 if (bufsize) in __cmdline_find_option()
212 int bufsize) in cmdline_find_option() argument
215 buffer, bufsize); in cmdline_find_option()
/linux-6.6.21/drivers/nvme/host/
Dzns.c124 size_t bufsize; in nvme_zns_alloc_report_buffer() local
133 bufsize = sizeof(struct nvme_zone_report) + in nvme_zns_alloc_report_buffer()
135 bufsize = min_t(size_t, bufsize, in nvme_zns_alloc_report_buffer()
137 bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT); in nvme_zns_alloc_report_buffer()
139 while (bufsize >= min_bufsize) { in nvme_zns_alloc_report_buffer()
140 buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY); in nvme_zns_alloc_report_buffer()
142 *buflen = bufsize; in nvme_zns_alloc_report_buffer()
145 bufsize >>= 1; in nvme_zns_alloc_report_buffer()
/linux-6.6.21/drivers/staging/greybus/
Dhid.c29 unsigned int bufsize; member
175 ghid->bufsize = 0; in gb_hid_free_buffers()
178 static int gb_hid_alloc_buffers(struct gb_hid *ghid, size_t bufsize) in gb_hid_alloc_buffers() argument
180 ghid->inbuf = kzalloc(bufsize, GFP_KERNEL); in gb_hid_alloc_buffers()
184 ghid->bufsize = bufsize; in gb_hid_alloc_buffers()
315 unsigned int bufsize = HID_MIN_BUFFER_SIZE; in gb_hid_start() local
318 gb_hid_find_max_report(hid, HID_INPUT_REPORT, &bufsize); in gb_hid_start()
319 gb_hid_find_max_report(hid, HID_OUTPUT_REPORT, &bufsize); in gb_hid_start()
320 gb_hid_find_max_report(hid, HID_FEATURE_REPORT, &bufsize); in gb_hid_start()
322 if (bufsize > HID_MAX_BUFFER_SIZE) in gb_hid_start()
[all …]
/linux-6.6.21/net/sunrpc/auth_gss/
Dgss_generic_token.c118 der_read_length(unsigned char **buf, int *bufsize) in der_read_length() argument
123 if (*bufsize < 1) in der_read_length()
126 (*bufsize)--; in der_read_length()
128 if ((sf &= 0x7f) > ((*bufsize)-1)) in der_read_length()
135 (*bufsize)--; in der_read_length()
/linux-6.6.21/init/
Dversion.c22 size_t bufsize = sizeof(init_uts_ns.name.nodename); in early_hostname() local
23 size_t maxlen = bufsize - 1; in early_hostname()
26 arglen = strlcpy(init_uts_ns.name.nodename, arg, bufsize); in early_hostname()
/linux-6.6.21/tools/testing/selftests/powerpc/alignment/
Dalignment_handler.c52 int bufsize; variable
235 ci0 = mmap(NULL, bufsize, PROT_WRITE | PROT_READ, MAP_SHARED, in do_test()
237 ci1 = mmap(NULL, bufsize, PROT_WRITE | PROT_READ, MAP_SHARED, in do_test()
238 fd, cioffset + bufsize); in do_test()
246 rc = posix_memalign(&mem0, bufsize, bufsize); in do_test()
252 rc = posix_memalign(&mem1, bufsize, bufsize); in do_test()
272 memcpy(ci0, mem0, bufsize); in do_test()
273 memcpy(ci1, mem1, bufsize); /* initialise output to the same */ in do_test()
299 munmap(ci0, bufsize); in do_test()
300 munmap(ci1, bufsize); in do_test()
[all …]
/linux-6.6.21/drivers/net/netdevsim/
Dipsec.c18 size_t bufsize; in nsim_dbg_netdev_ops_read() local
26 bufsize = (ipsec->count * 4 * 60) + 60; in nsim_dbg_netdev_ops_read()
27 buf = kzalloc(bufsize, GFP_KERNEL); in nsim_dbg_netdev_ops_read()
32 p += scnprintf(p, bufsize - (p - buf), in nsim_dbg_netdev_ops_read()
42 p += scnprintf(p, bufsize - (p - buf), in nsim_dbg_netdev_ops_read()
46 p += scnprintf(p, bufsize - (p - buf), in nsim_dbg_netdev_ops_read()
50 p += scnprintf(p, bufsize - (p - buf), in nsim_dbg_netdev_ops_read()
/linux-6.6.21/drivers/net/wireless/broadcom/b43/
Ddebugfs.c31 ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize);
53 if (bufsize - count) \
55 bufsize - count, \
67 char *buf, size_t bufsize) in shm16read__read_file() argument
143 char *buf, size_t bufsize) in shm32read__read_file() argument
222 char *buf, size_t bufsize) in mmio16read__read_file() argument
286 char *buf, size_t bufsize) in mmio32read__read_file() argument
350 char *buf, size_t bufsize) in txstat_read_file() argument
426 char *buf, size_t bufsize) in loctls_read_file() argument
498 const size_t bufsize = 1024 * 16; /* 16 kiB buffer */ in b43_debugfs_read() local
[all …]

12345678910