| /linux/lib/tests/ |
| H A D | kunit_iov_iter.c | 76 void *buffer, size_t bufsize, in iov_kunit_load_kvec() argument 86 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_load_kvec() 91 KUNIT_ASSERT_LE(test, size, bufsize); in iov_kunit_load_kvec() 106 size_t bufsize, npages, size, copied; in iov_kunit_copy_to_kvec() local 109 bufsize = 0x100000; in iov_kunit_copy_to_kvec() 110 npages = bufsize / PAGE_SIZE; in iov_kunit_copy_to_kvec() 113 for (i = 0; i < bufsize; i++) in iov_kunit_copy_to_kvec() 117 memset(buffer, 0, bufsize); in iov_kunit_copy_to_kvec() 120 buffer, bufsize, kvec_test_ranges); in iov_kunit_copy_to_kvec() 131 memset(scratch, 0, bufsize); in iov_kunit_copy_to_kvec() 156 size_t bufsize, npages, size, copied; iov_kunit_copy_from_kvec() local 221 iov_kunit_load_bvec(struct kunit * test,struct iov_iter * iter,int dir,struct bio_vec * bvec,unsigned int bvmax,struct page ** pages,size_t npages,size_t bufsize,const struct bvec_test_range * pr) iov_kunit_load_bvec() argument 265 size_t bufsize, npages, size, copied; iov_kunit_copy_to_bvec() local 319 size_t bufsize, npages, size, copied; iov_kunit_copy_from_bvec() local 423 size_t bufsize, npages, size, copied; iov_kunit_copy_to_folioq() local 485 size_t bufsize, npages, size, copied; iov_kunit_copy_from_folioq() local 585 size_t bufsize, npages, size, copied; iov_kunit_copy_to_xarray() local 643 size_t bufsize, npages, size, copied; iov_kunit_copy_from_xarray() local 707 size_t bufsize, size = 0, npages; iov_kunit_extract_pages_kvec() local 786 size_t bufsize, size = 0, npages; iov_kunit_extract_pages_bvec() local 864 size_t bufsize, size = 0, npages; iov_kunit_extract_pages_folioq() local 943 size_t bufsize, size = 0, npages; iov_kunit_extract_pages_xarray() local [all...] |
| H A D | printf_kunit.c | 42 do_test(struct kunit *kunittest, const char *file, const int line, int bufsize, const char *expect, in do_test() argument 52 ret = vsnprintf(test_buffer, bufsize, fmt, aq); in do_test() 58 file, line, bufsize, fmt, ret, elen); in do_test() 65 file, line, bufsize, fmt); in do_test() 69 if (!bufsize) { in do_test() 78 written = min(bufsize-1, elen); in do_test() 82 file, line, bufsize, fmt); in do_test() 86 if (memchr_inv(test_buffer + written + 1, FILL_CHAR, bufsize - (written + 1))) { in do_test() 89 file, line, bufsize, fmt); in do_test() 93 if (memchr_inv(test_buffer + bufsize, FILL_CHA in do_test() [all...] |
| /linux/drivers/sbus/char/ |
| H A D | openprom.c | 62 unsigned int bufsize; in copyin() local 67 if (get_user(bufsize, &info->oprom_size)) in copyin() 70 if (bufsize == 0) in copyin() 73 /* If the bufsize is too large, just limit it. 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 130 opromgetprop(void __user * argp,struct device_node * dp,struct openpromio * op,int bufsize) opromgetprop() argument 147 opromnxtprop(void __user * argp,struct device_node * dp,struct openpromio * op,int bufsize) opromnxtprop() argument 177 opromsetopt(struct device_node * dp,struct openpromio * op,int bufsize) opromsetopt() argument 185 opromnext(void __user * argp,unsigned int cmd,struct device_node * dp,struct openpromio * op,int bufsize,DATA * data) opromnext() argument 232 oprompci2node(void __user * argp,struct device_node * dp,struct openpromio * op,int bufsize,DATA * data) oprompci2node() argument 258 oprompath2node(void __user * argp,struct device_node * dp,struct openpromio * op,int bufsize,DATA * data) oprompath2node() argument 272 opromgetbootargs(void __user * argp,struct openpromio * op,int bufsize) opromgetbootargs() argument 295 int bufsize, error = 0; openprom_sunos_ioctl() local [all...] |
| /linux/samples/bpf/ |
| H A D | tcp_bufs_kern.c | 28 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()
|
| H A D | tcp_iw_kern.c | 28 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()
|
| H A D | tcp_clamp_kern.c | 28 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/drivers/s390/char/ |
| H A D | vmcp.c | 31 unsigned int bufsize; member 64 order = get_order(session->bufsize); in vmcp_response_alloc() 65 nr_pages = ALIGN(session->bufsize, PAGE_SIZE) >> PAGE_SHIFT; in vmcp_response_alloc() 88 order = get_order(session->bufsize); in vmcp_response_free() 89 nr_pages = ALIGN(session->bufsize, PAGE_SIZE) >> PAGE_SHIFT; in vmcp_response_free() 111 session->bufsize = PAGE_SIZE; in vmcp_open() 144 size = min_t(size_t, session->resp_size, session->bufsize); in vmcp_read() 178 session->resp_size = cpcmd(cmd, session->response, session->bufsize, in vmcp_write() 215 ret = get_user(session->bufsize, argp); in vmcp_ioctl() 217 session->bufsize in vmcp_ioctl() [all...] |
| /linux/sound/soc/sof/intel/ |
| H A D | hda-loader-skl.c | 272 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/lib/ |
| H A D | oid_registry.c | 130 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()
|
| /linux/scripts/dtc/libfdt/ |
| H A D | fdt_sw.c | 109 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 …]
|
| H A D | fdt_empty_tree.c | 13 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/drivers/net/wireless/broadcom/b43legacy/ |
| H A D | debugfs.c | 32 ssize_t (*read)(struct b43legacy_wldev *dev, char *buf, size_t bufsize); 55 if (bufsize - count) \ 57 bufsize - count, \ 65 static ssize_t tsf_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize) in tsf_read_file() argument 91 static ssize_t ucode_regs_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize) in ucode_regs_read_file() argument 105 static ssize_t shm_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize) in shm_read_file() argument 113 if (bufsize < sizeof(tmp)) in shm_read_file() 118 bufsize -= sizeof(tmp); in shm_read_file() 124 static ssize_t txstat_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufsize) in txstat_read_file() argument 194 const size_t bufsize in b43legacy_debugfs_read() local [all...] |
| /linux/net/wireless/ |
| H A D | debugfs.c | 157 size_t bufsize; in wiphy_locked_debugfs_read() 168 w->ret = w->handler(w->wiphy, w->file, w->buf, w->bufsize, w->data); in wiphy_locked_debugfs_read() 182 char *buf, size_t bufsize, in wiphy_locked_debugfs_read() 188 size_t bufsize, in wiphy_locked_debugfs_read() 197 .bufsize = bufsize, 208 memset(buf, 0, bufsize); 220 if (WARN_ON(work.ret > bufsize)) in wiphy_locked_debugfs_write_cancel() 262 struct file *file, char *buf, size_t bufsize, in wiphy_locked_debugfs_write() 287 if (count >= bufsize) 124 size_t bufsize; global() member 149 wiphy_locked_debugfs_read(struct wiphy * wiphy,struct file * file,char * buf,size_t bufsize,char __user * userbuf,size_t count,loff_t * ppos,ssize_t (* handler)(struct wiphy * wiphy,struct file * file,char * buf,size_t bufsize,void * data),void * data) wiphy_locked_debugfs_read() argument 229 wiphy_locked_debugfs_write(struct wiphy * wiphy,struct file * file,char * buf,size_t bufsize,const char __user * userbuf,size_t count,ssize_t (* handler)(struct wiphy * wiphy,struct file * file,char * buf,size_t count,void * data),void * data) wiphy_locked_debugfs_write() argument [all...] |
| /linux/arch/x86/lib/ |
| H A D | cmdline.c | 126 const char *option, char *buffer, int bufsize) in __cmdline_find_option() argument 195 if (++len < bufsize) in __cmdline_find_option() 202 if (bufsize) in __cmdline_find_option() 223 int bufsize) in cmdline_find_option() argument 227 ret = __cmdline_find_option(cmdline, COMMAND_LINE_SIZE, option, buffer, bufsize); in cmdline_find_option() 232 return __cmdline_find_option(builtin_cmdline, COMMAND_LINE_SIZE, option, buffer, bufsize); in cmdline_find_option()
|
| /linux/arch/powerpc/platforms/pseries/ |
| H A D | reconfig.c | 194 static int do_add_node(char *buf, size_t bufsize) in do_add_node() argument 202 end = buf + bufsize; in do_add_node() 215 /* rv = build_prop_list(tmp, bufsize - (tmp - buf), &proplist); */ 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 [all...] |
| /linux/drivers/staging/greybus/ |
| H A D | hid.c | 29 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() [all...] |
| /linux/drivers/nvme/host/ |
| H A D | zns.c | 123 size_t bufsize; in nvme_zns_alloc_report_buffer() local 132 bufsize = sizeof(struct nvme_zone_report) + in nvme_zns_alloc_report_buffer() 134 bufsize = min_t(size_t, bufsize, in nvme_zns_alloc_report_buffer() 136 bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT); in nvme_zns_alloc_report_buffer() 138 while (bufsize >= min_bufsize) { in nvme_zns_alloc_report_buffer() 139 buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY); in nvme_zns_alloc_report_buffer() 141 *buflen = bufsize; in nvme_zns_alloc_report_buffer() 144 bufsize >> in nvme_zns_alloc_report_buffer() [all...] |
| /linux/drivers/mtd/tests/ |
| H A D | stresstest.c | 39 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/tools/testing/selftests/powerpc/alignment/ |
| H A D | alignment_handler.c | 52 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/init/ |
| H A D | version.c | 22 size_t bufsize = sizeof(init_uts_ns.name.nodename); in early_hostname() local 23 size_t maxlen = bufsize - 1; in early_hostname() 26 arglen = strscpy(init_uts_ns.name.nodename, arg, bufsize); in early_hostname()
|
| /linux/sound/hda/core/ |
| H A D | stream.c | 280 snd_hdac_stream_writel(azx_dev, SD_CBL, azx_dev->bufsize); in snd_hdac_stream_setup() 344 azx_dev->bufsize = 0; in snd_hdac_stream_cleanup() 514 periods = azx_dev->bufsize / period_bytes; in snd_hdac_stream_setup_bdle() 558 azx_dev->bufsize, period_bytes); in snd_hdac_stream_setup_bdle() 603 unsigned int bufsize, period_bytes; in snd_hdac_stream_set_params() local 608 bufsize = snd_pcm_lib_buffer_bytes(substream); in snd_hdac_stream_set_params() 612 bufsize = cstream->runtime->buffer_size; in snd_hdac_stream_set_params() 619 if (bufsize != azx_dev->bufsize || in snd_hdac_stream_set_params() 623 azx_dev->bufsize = bufsize; in snd_hdac_stream_set_params() 936 azx_dev->bufsize = byte_size; in snd_hdac_dsp_prepare() [all …]
|
| /linux/drivers/net/wireless/broadcom/b43/ |
| H A D | debugfs.c | 31 ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize); 52 if (bufsize - count) \ 54 bufsize - count, \ 66 char *buf, size_t bufsize) in shm16read__read_file() argument 142 char *buf, size_t bufsize) in shm32read__read_file() argument 221 char *buf, size_t bufsize) in mmio16read__read_file() argument 285 char *buf, size_t bufsize) in mmio32read__read_file() argument 349 char *buf, size_t bufsize) in txstat_read_file() argument 425 char *buf, size_t bufsize) in loctls_read_file() argument 497 const size_t bufsize in b43_debugfs_read() local [all...] |
| /linux/arch/x86/boot/ |
| H A D | cmdline.c | 28 int __cmdline_find_option(unsigned long cmdline_ptr, const char *option, char *buffer, int bufsize) in __cmdline_find_option() argument 80 if (len < bufsize-1) in __cmdline_find_option() 88 if (bufsize) in __cmdline_find_option()
|
| /linux/arch/powerpc/boot/ |
| H A D | libfdt-wrapper.c | 159 int bufsize; in fdt_init() local 174 bufsize = fdt_totalsize(fdt) + EXPAND_GRANULARITY; in fdt_init() 175 buf = malloc(bufsize); in fdt_init() 179 err = fdt_open_into(fdt, buf, bufsize); in fdt_init()
|
| /linux/fs/isofs/ |
| H A D | namei.c | 40 unsigned long bufsize = ISOFS_BUFFER_SIZE(dir); in isofs_find_entry() local 82 if (offset >= bufsize) { in isofs_find_entry() 83 int slop = bufsize - offset + de_len; in isofs_find_entry() 85 offset &= bufsize - 1; in isofs_find_entry()
|