Home
last modified time | relevance | path

Searched refs:tmpbuf (Results 1 – 25 of 58) sorted by relevance

123

/Linux-v4.19/arch/powerpc/boot/
Dmktree.c40 unsigned int tmpbuf[IMGBLK / sizeof(unsigned int)]; variable
99 if (read(in_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) { in main()
105 if (tmpbuf[0] != htonl(0x7f454c46)) { in main()
125 if (read(in_fd, tmpbuf, sizeof(tmpbuf)) < 0) { in main()
129 cp = tmpbuf; in main()
130 for (i = 0; i < sizeof(tmpbuf) / sizeof(unsigned int); i++) in main()
132 if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) { in main()
/Linux-v4.19/net/sunrpc/
Dsysctl.c64 char tmpbuf[256]; in proc_do_xprt() local
71 len = svc_print_xprts(tmpbuf, sizeof(tmpbuf)); in proc_do_xprt()
72 return simple_read_from_buffer(buffer, *lenp, ppos, tmpbuf, len); in proc_do_xprt()
79 char tmpbuf[20], c, *s = NULL; in proc_dodebug() local
100 if (left > sizeof(tmpbuf) - 1) in proc_dodebug()
102 if (copy_from_user(tmpbuf, p, left)) in proc_dodebug()
104 tmpbuf[left] = '\0'; in proc_dodebug()
106 value = simple_strtol(tmpbuf, &s, 0); in proc_dodebug()
108 left -= (s - tmpbuf); in proc_dodebug()
120 len = sprintf(tmpbuf, "0x%04x", *(unsigned int *) table->data); in proc_dodebug()
[all …]
/Linux-v4.19/drivers/staging/rtl8723bs/hal/
Dsdio_ops.c207 u8 *tmpbuf; in sdio_read32() local
209 tmpbuf = rtw_malloc(8); in sdio_read32()
210 if (!tmpbuf) { in sdio_read32()
216 sd_read(intfhdl, ftaddr, 8, tmpbuf); in sdio_read32()
217 memcpy(&le_tmp, tmpbuf+shift, 4); in sdio_read32()
220 kfree(tmpbuf); in sdio_read32()
253 u8 *tmpbuf; in sdio_readN() local
258 tmpbuf = rtw_malloc(n); in sdio_readN()
259 if (!tmpbuf) in sdio_readN()
262 err = sd_read(intfhdl, ftaddr, n, tmpbuf); in sdio_readN()
[all …]
/Linux-v4.19/drivers/pnp/pnpbios/
Dproc.c68 char *tmpbuf; in escd_proc_show() local
81 tmpbuf = kzalloc(escd.escd_size, GFP_KERNEL); in escd_proc_show()
82 if (!tmpbuf) in escd_proc_show()
85 if (pnp_bios_read_escd(tmpbuf, escd.nv_storage_base)) { in escd_proc_show()
86 kfree(tmpbuf); in escd_proc_show()
91 (unsigned char)(tmpbuf[0]) + (unsigned char)(tmpbuf[1]) * 256; in escd_proc_show()
97 kfree(tmpbuf); in escd_proc_show()
101 seq_write(m, tmpbuf, escd_size); in escd_proc_show()
102 kfree(tmpbuf); in escd_proc_show()
/Linux-v4.19/drivers/spi/
Dspi-mem.c196 u8 *tmpbuf; in spi_mem_exec_op() local
245 tmpbuf = kzalloc(tmpbufsize, GFP_KERNEL | GFP_DMA); in spi_mem_exec_op()
246 if (!tmpbuf) in spi_mem_exec_op()
251 tmpbuf[0] = op->cmd.opcode; in spi_mem_exec_op()
252 xfers[xferpos].tx_buf = tmpbuf; in spi_mem_exec_op()
263 tmpbuf[i + 1] = op->addr.val >> in spi_mem_exec_op()
266 xfers[xferpos].tx_buf = tmpbuf + 1; in spi_mem_exec_op()
275 memset(tmpbuf + op->addr.nbytes + 1, 0xff, op->dummy.nbytes); in spi_mem_exec_op()
276 xfers[xferpos].tx_buf = tmpbuf + op->addr.nbytes + 1; in spi_mem_exec_op()
301 kfree(tmpbuf); in spi_mem_exec_op()
/Linux-v4.19/drivers/media/i2c/
Dsaa6588.c264 unsigned char tmpbuf[6]; in saa6588_i2c_poll() local
270 if (6 != i2c_master_recv(client, &tmpbuf[0], 6)) { in saa6588_i2c_poll()
276 s->sync = tmpbuf[0] & 0x10; in saa6588_i2c_poll()
279 blocknum = tmpbuf[0] >> 5; in saa6588_i2c_poll()
304 swap(tmpbuf[2], tmpbuf[0]); in saa6588_i2c_poll()
317 if ((tmpbuf[2] & 0x03) == 0x03) in saa6588_i2c_poll()
319 else if ((tmpbuf[2] & 0x03) != 0x00) in saa6588_i2c_poll()
321 tmpbuf[2] = tmp; /* Is this enough ? Should we also check other bits ? */ in saa6588_i2c_poll()
324 block_to_buf(s, tmpbuf); in saa6588_i2c_poll()
/Linux-v4.19/drivers/isdn/hardware/eicon/
Ddivasproc.c62 char tmpbuf[80]; in divas_read() local
68 divas_get_version(tmpbuf); in divas_read()
69 if (copy_to_user(buf + len, &tmpbuf, strlen(tmpbuf))) in divas_read()
71 len += strlen(tmpbuf); in divas_read()
77 sprintf(tmpbuf, in divas_read()
83 if ((strlen(tmpbuf) + len) > count) in divas_read()
86 (buf + len, &tmpbuf, in divas_read()
87 strlen(tmpbuf))) return -EFAULT; in divas_read()
88 len += strlen(tmpbuf); in divas_read()
/Linux-v4.19/drivers/oprofile/
Doprofilefs.c55 char tmpbuf[TMPBUFSIZE]; in oprofilefs_ulong_to_user() local
56 size_t maxlen = snprintf(tmpbuf, TMPBUFSIZE, "%lu\n", val); in oprofilefs_ulong_to_user()
59 return simple_read_from_buffer(buf, count, offset, tmpbuf, maxlen); in oprofilefs_ulong_to_user()
72 char tmpbuf[TMPBUFSIZE]; in oprofilefs_ulong_from_user() local
81 memset(tmpbuf, 0x0, TMPBUFSIZE); in oprofilefs_ulong_from_user()
83 if (copy_from_user(tmpbuf, buf, count)) in oprofilefs_ulong_from_user()
87 *val = simple_strtoul(tmpbuf, NULL, 0); in oprofilefs_ulong_from_user()
/Linux-v4.19/fs/quota/
Dquota_tree.c134 char *tmpbuf = getdqbuf(info->dqi_usable_bs); in remove_free_dqentry() local
140 if (!tmpbuf) in remove_free_dqentry()
143 err = read_blk(info, nextblk, tmpbuf); in remove_free_dqentry()
146 ((struct qt_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = in remove_free_dqentry()
148 err = write_blk(info, nextblk, tmpbuf); in remove_free_dqentry()
153 err = read_blk(info, prevblk, tmpbuf); in remove_free_dqentry()
156 ((struct qt_disk_dqdbheader *)tmpbuf)->dqdh_next_free = in remove_free_dqentry()
158 err = write_blk(info, prevblk, tmpbuf); in remove_free_dqentry()
165 kfree(tmpbuf); in remove_free_dqentry()
173 kfree(tmpbuf); in remove_free_dqentry()
[all …]
/Linux-v4.19/drivers/mmc/core/
Dsdio_io.c530 ret = sdio_memcpy_fromio(func, func->tmpbuf, addr, 2); in sdio_readw()
536 return le16_to_cpup((__le16 *)func->tmpbuf); in sdio_readw()
555 *(__le16 *)func->tmpbuf = cpu_to_le16(b); in sdio_writew()
557 ret = sdio_memcpy_toio(func, addr, func->tmpbuf, 2); in sdio_writew()
578 ret = sdio_memcpy_fromio(func, func->tmpbuf, addr, 4); in sdio_readl()
584 return le32_to_cpup((__le32 *)func->tmpbuf); in sdio_readl()
603 *(__le32 *)func->tmpbuf = cpu_to_le32(b); in sdio_writel()
605 ret = sdio_memcpy_toio(func, addr, func->tmpbuf, 4); in sdio_writel()
Dsdio_bus.c270 kfree(func->tmpbuf); in sdio_release_func()
289 func->tmpbuf = kmalloc(4, GFP_KERNEL); in sdio_alloc_func()
290 if (!func->tmpbuf) { in sdio_alloc_func()
/Linux-v4.19/crypto/
Dpcbc.c76 u8 tmpbuf[MAX_CIPHER_BLOCKSIZE]; in crypto_pcbc_encrypt_inplace() local
79 memcpy(tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace()
82 crypto_xor_cpy(iv, tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace()
148 u8 tmpbuf[MAX_CIPHER_BLOCKSIZE] __aligned(__alignof__(u32)); in crypto_pcbc_decrypt_inplace() local
151 memcpy(tmpbuf, src, bsize); in crypto_pcbc_decrypt_inplace()
154 crypto_xor_cpy(iv, src, tmpbuf, bsize); in crypto_pcbc_decrypt_inplace()
/Linux-v4.19/drivers/media/radio/si470x/
Dradio-si470x-i2c.c257 unsigned char tmpbuf[3]; in si470x_i2c_interrupt() local
309 put_unaligned_le16(rds, &tmpbuf); in si470x_i2c_interrupt()
310 tmpbuf[2] = blocknum; /* offset name */ in si470x_i2c_interrupt()
311 tmpbuf[2] |= blocknum << 3; /* received offset */ in si470x_i2c_interrupt()
313 tmpbuf[2] |= 0x80; /* uncorrectable errors */ in si470x_i2c_interrupt()
315 tmpbuf[2] |= 0x40; /* corrected error(s) */ in si470x_i2c_interrupt()
318 memcpy(&radio->buffer[radio->wr_index], &tmpbuf, 3); in si470x_i2c_interrupt()
Dradio-si470x-usb.c379 unsigned char tmpbuf[3]; in si470x_int_in_callback() local
443 put_unaligned_le16(rds, &tmpbuf); in si470x_int_in_callback()
444 tmpbuf[2] = blocknum; /* offset name */ in si470x_int_in_callback()
445 tmpbuf[2] |= blocknum << 3; /* received offset */ in si470x_int_in_callback()
447 tmpbuf[2] |= 0x80; /* uncorrectable errors */ in si470x_int_in_callback()
449 tmpbuf[2] |= 0x40; /* corrected error(s) */ in si470x_int_in_callback()
452 memcpy(&radio->buffer[radio->wr_index], &tmpbuf, 3); in si470x_int_in_callback()
/Linux-v4.19/drivers/media/usb/gspca/
Dt613.c338 u8 *tmpbuf; in reg_w_buf() local
340 tmpbuf = kmemdup(buffer, len, GFP_KERNEL); in reg_w_buf()
341 if (!tmpbuf) { in reg_w_buf()
350 tmpbuf, len, 500); in reg_w_buf()
351 kfree(tmpbuf); in reg_w_buf()
361 u8 *p, *tmpbuf; in reg_w_ixbuf() local
364 p = tmpbuf = gspca_dev->usb_buf; in reg_w_ixbuf()
366 p = tmpbuf = kmalloc_array(len, 2, GFP_KERNEL); in reg_w_ixbuf()
367 if (!tmpbuf) { in reg_w_ixbuf()
382 tmpbuf, len * 2, 500); in reg_w_ixbuf()
[all …]
Dpac7311.c548 unsigned char tmpbuf[4]; in pac_start_frame() local
553 tmpbuf[0] = lines >> 8; in pac_start_frame()
554 tmpbuf[1] = lines & 0xff; in pac_start_frame()
555 tmpbuf[2] = samples_per_line >> 8; in pac_start_frame()
556 tmpbuf[3] = samples_per_line & 0xff; in pac_start_frame()
559 tmpbuf, sizeof(tmpbuf)); in pac_start_frame()
/Linux-v4.19/security/
Dcommoncap.c382 char *tmpbuf = NULL; in cap_inode_getsecurity() local
397 &tmpbuf, size, GFP_NOFS); in cap_inode_getsecurity()
404 cap = (struct vfs_cap_data *) tmpbuf; in cap_inode_getsecurity()
409 *buffer = tmpbuf; in cap_inode_getsecurity()
411 kfree(tmpbuf); in cap_inode_getsecurity()
414 kfree(tmpbuf); in cap_inode_getsecurity()
418 nscap = (struct vfs_ns_cap_data *) tmpbuf; in cap_inode_getsecurity()
427 *buffer = tmpbuf; in cap_inode_getsecurity()
430 kfree(tmpbuf); in cap_inode_getsecurity()
435 kfree(tmpbuf); in cap_inode_getsecurity()
[all …]
/Linux-v4.19/security/integrity/ima/
Dima_api.c207 void *tmpbuf; in ima_collect_measurement() local
237 tmpbuf = krealloc(iint->ima_hash, length, GFP_NOFS); in ima_collect_measurement()
238 if (!tmpbuf) { in ima_collect_measurement()
243 iint->ima_hash = tmpbuf; in ima_collect_measurement()
/Linux-v4.19/drivers/infiniband/hw/qib/
Dqib_diag.c554 u32 *tmpbuf = NULL; in qib_diagpkt_write() local
610 tmpbuf = vmalloc(plen); in qib_diagpkt_write()
611 if (!tmpbuf) { in qib_diagpkt_write()
616 if (copy_from_user(tmpbuf, in qib_diagpkt_write()
647 qib_pio_copy(piobuf + 2, tmpbuf, plen - 1); in qib_diagpkt_write()
649 __raw_writel(tmpbuf[plen - 1], piobuf + plen + 1); in qib_diagpkt_write()
651 qib_pio_copy(piobuf + 2, tmpbuf, plen); in qib_diagpkt_write()
672 vfree(tmpbuf); in qib_diagpkt_write()
/Linux-v4.19/security/selinux/
Dselinuxfs.c126 char tmpbuf[TMPBUFLEN]; in sel_read_enforce() local
129 length = scnprintf(tmpbuf, TMPBUFLEN, "%d", in sel_read_enforce()
131 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); in sel_read_enforce()
205 char tmpbuf[TMPBUFLEN]; in sel_read_handle_unknown() local
212 length = scnprintf(tmpbuf, TMPBUFLEN, "%d", handle_unknown); in sel_read_handle_unknown()
213 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); in sel_read_handle_unknown()
331 char tmpbuf[TMPBUFLEN]; in sel_read_policyvers() local
334 length = scnprintf(tmpbuf, TMPBUFLEN, "%u", POLICYDB_VERSION_MAX); in sel_read_policyvers()
335 return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); in sel_read_policyvers()
356 char tmpbuf[TMPBUFLEN]; in sel_read_mls() local
[all …]
/Linux-v4.19/fs/bfs/
Dinode.c303 char *tmpbuf = (char *)get_zeroed_page(GFP_KERNEL); in bfs_dump_imap() local
305 if (!tmpbuf) in bfs_dump_imap()
310 strcat(tmpbuf, "1"); in bfs_dump_imap()
312 strcat(tmpbuf, "0"); in bfs_dump_imap()
315 prefix, BFS_SB(s)->si_lasti, tmpbuf); in bfs_dump_imap()
316 free_page((unsigned long)tmpbuf); in bfs_dump_imap()
/Linux-v4.19/drivers/target/iscsi/
Discsi_target_parameters.c1344 char tmpbuf[11]; in iscsi_enforce_integrity_rules() local
1345 memset(tmpbuf, 0, sizeof(tmpbuf)); in iscsi_enforce_integrity_rules()
1346 sprintf(tmpbuf, "%u", MaxBurstLength); in iscsi_enforce_integrity_rules()
1347 if (iscsi_update_param_value(param, tmpbuf)) in iscsi_enforce_integrity_rules()
1366 char *tmpbuf, *start = NULL, *end = NULL; in iscsi_decode_text_input() local
1368 tmpbuf = kzalloc(length + 1, GFP_KERNEL); in iscsi_decode_text_input()
1369 if (!tmpbuf) { in iscsi_decode_text_input()
1374 memcpy(tmpbuf, textbuf, length); in iscsi_decode_text_input()
1375 tmpbuf[length] = '\0'; in iscsi_decode_text_input()
1376 start = tmpbuf; in iscsi_decode_text_input()
[all …]
/Linux-v4.19/sound/usb/usx2y/
Dusbusx2yaudio.c158 urb->transfer_buffer = subs->tmpbuf; in usX2Y_urb_play_prepare()
159 memcpy(subs->tmpbuf, runtime->dma_area + in usX2Y_urb_play_prepare()
161 memcpy(subs->tmpbuf + len * usX2Y->stride, in usX2Y_urb_play_prepare()
172 urb->transfer_buffer = subs->tmpbuf; in usX2Y_urb_play_prepare()
401 kfree(subs->tmpbuf); in usX2Y_urbs_release()
402 subs->tmpbuf = NULL; in usX2Y_urbs_release()
420 if (is_playback && NULL == subs->tmpbuf) { /* allocate a temporary buffer for playback */ in usX2Y_urbs_allocate()
421 subs->tmpbuf = kcalloc(nr_of_packs(), subs->maxpacksize, GFP_KERNEL); in usX2Y_urbs_allocate()
422 if (!subs->tmpbuf) in usX2Y_urbs_allocate()
/Linux-v4.19/net/rxrpc/
Drxkad.c110 __be32 *tmpbuf; in rxkad_prime_packet_security() local
118 tmpbuf = kmalloc(tmpsize, GFP_KERNEL); in rxkad_prime_packet_security()
119 if (!tmpbuf) in rxkad_prime_packet_security()
125 tmpbuf[0] = htonl(conn->proto.epoch); in rxkad_prime_packet_security()
126 tmpbuf[1] = htonl(conn->proto.cid); in rxkad_prime_packet_security()
127 tmpbuf[2] = 0; in rxkad_prime_packet_security()
128 tmpbuf[3] = htonl(conn->security_ix); in rxkad_prime_packet_security()
130 sg_init_one(&sg, tmpbuf, tmpsize); in rxkad_prime_packet_security()
137 memcpy(&conn->csum_iv, tmpbuf + 2, sizeof(conn->csum_iv)); in rxkad_prime_packet_security()
138 kfree(tmpbuf); in rxkad_prime_packet_security()
/Linux-v4.19/lib/
Ddynamic_debug.c662 char *tmpbuf; in ddebug_proc_write() local
671 tmpbuf = memdup_user_nul(ubuf, len); in ddebug_proc_write()
672 if (IS_ERR(tmpbuf)) in ddebug_proc_write()
673 return PTR_ERR(tmpbuf); in ddebug_proc_write()
676 ret = ddebug_exec_queries(tmpbuf, NULL); in ddebug_proc_write()
677 kfree(tmpbuf); in ddebug_proc_write()

123