Home
last modified time | relevance | path

Searched refs:tbuf (Results 1 – 25 of 41) sorted by relevance

12

/drivers/hwmon/pmbus/
Dmax20730.c116 char tbuf[DEBUG_FS_DATA_MAX] = { 0 }; in max20730_debugfs_read() local
125 len = scnprintf(tbuf, DEBUG_FS_DATA_MAX, "%d.%d\n", in max20730_debugfs_read()
144 len = scnprintf(tbuf, DEBUG_FS_DATA_MAX, "%d\n", ret); in max20730_debugfs_read()
151 len = strlcpy(tbuf, "2000\n", DEBUG_FS_DATA_MAX); in max20730_debugfs_read()
153 len = strlcpy(tbuf, "125\n", DEBUG_FS_DATA_MAX); in max20730_debugfs_read()
155 len = strlcpy(tbuf, "62.5\n", DEBUG_FS_DATA_MAX); in max20730_debugfs_read()
157 len = strlcpy(tbuf, "32\n", DEBUG_FS_DATA_MAX); in max20730_debugfs_read()
166 len = strlcpy(tbuf, "0.8\n", DEBUG_FS_DATA_MAX); in max20730_debugfs_read()
168 len = strlcpy(tbuf, "3.2\n", DEBUG_FS_DATA_MAX); in max20730_debugfs_read()
170 len = strlcpy(tbuf, "1.6\n", DEBUG_FS_DATA_MAX); in max20730_debugfs_read()
[all …]
/drivers/video/backlight/
Dili922x.c153 unsigned char tbuf[CMD_BUFSIZE]; in ili922x_read_status() local
159 xfer.tx_buf = tbuf; in ili922x_read_status()
164 tbuf[0] = set_tx_byte(START_BYTE(ili922x_id, START_RS_INDEX, in ili922x_read_status()
171 tbuf[i] = set_tx_byte(0); /* dummy */ in ili922x_read_status()
196 unsigned char tbuf[CMD_BUFSIZE]; in ili922x_read() local
203 xfer_regindex.tx_buf = tbuf; in ili922x_read()
208 tbuf[0] = set_tx_byte(START_BYTE(ili922x_id, START_RS_INDEX, in ili922x_read()
210 tbuf[1] = set_tx_byte(0); in ili922x_read()
211 tbuf[2] = set_tx_byte(reg); in ili922x_read()
218 tbuf[len++] = set_tx_byte(START_BYTE(ili922x_id, START_RS_REG, in ili922x_read()
[all …]
/drivers/tty/
Dn_hdlc.c277 struct n_hdlc_buf *tbuf; in n_hdlc_send_frames() local
291 tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list); in n_hdlc_send_frames()
292 while (tbuf) { in n_hdlc_send_frames()
293 pr_debug("sending frame %p, count=%d\n", tbuf, tbuf->count); in n_hdlc_send_frames()
297 actual = tty->ops->write(tty, tbuf->buf, tbuf->count); in n_hdlc_send_frames()
301 n_hdlc_buf_return(&n_hdlc->tx_buf_list, tbuf); in n_hdlc_send_frames()
307 actual = tbuf->count; in n_hdlc_send_frames()
309 if (actual == tbuf->count) { in n_hdlc_send_frames()
310 pr_debug("frame %p completed\n", tbuf); in n_hdlc_send_frames()
313 n_hdlc_buf_put(&n_hdlc->tx_free_buf_list, tbuf); in n_hdlc_send_frames()
[all …]
/drivers/staging/gs_fpgaboot/
Dgs_fpgaboot.c43 u8 tbuf[2]; in readinfo_bitstream() local
47 read_bitstream(bitdata, tbuf, offset, 1); in readinfo_bitstream()
50 read_bitstream(bitdata, tbuf, offset, 2); in readinfo_bitstream()
52 len = get_unaligned_be16(tbuf); in readinfo_bitstream()
69 u8 tbuf[4]; in readlength_bitstream() local
72 read_bitstream(bitdata, tbuf, offset, 1); in readlength_bitstream()
75 if (tbuf[0] != 'e') { in readlength_bitstream()
76 pr_err("error: length section is not 'e', but %c\n", tbuf[0]); in readlength_bitstream()
81 read_bitstream(bitdata, tbuf, offset, 4); in readlength_bitstream()
83 *lendata = get_unaligned_be32(tbuf); in readlength_bitstream()
/drivers/char/tpm/
Dtpm2-space.c74 struct tpm_buf tbuf; in tpm2_load_context() local
79 rc = tpm_buf_init(&tbuf, TPM2_ST_NO_SESSIONS, TPM2_CC_CONTEXT_LOAD); in tpm2_load_context()
85 tpm_buf_append(&tbuf, &buf[*offset], body_size); in tpm2_load_context()
87 rc = tpm_transmit_cmd(chip, &tbuf, 4, NULL); in tpm2_load_context()
91 tpm_buf_destroy(&tbuf); in tpm2_load_context()
106 tpm_buf_destroy(&tbuf); in tpm2_load_context()
111 tpm_buf_destroy(&tbuf); in tpm2_load_context()
115 *handle = be32_to_cpup((__be32 *)&tbuf.data[TPM_HEADER_SIZE]); in tpm2_load_context()
118 tpm_buf_destroy(&tbuf); in tpm2_load_context()
125 struct tpm_buf tbuf; in tpm2_save_context() local
[all …]
/drivers/net/ethernet/mellanox/mlx5/core/
Ddebugfs.c130 char tbuf[22]; in average_read() local
137 ret = snprintf(tbuf, sizeof(tbuf), "%llu\n", field); in average_read()
138 return simple_read_from_buffer(buf, count, pos, tbuf, ret); in average_read()
364 char tbuf[18]; in dbg_read() local
390 ret = snprintf(tbuf, sizeof(tbuf), "%s\n", (const char *)(unsigned long)field); in dbg_read()
392 ret = snprintf(tbuf, sizeof(tbuf), "0x%llx\n", field); in dbg_read()
394 return simple_read_from_buffer(buf, count, pos, tbuf, ret); in dbg_read()
/drivers/scsi/snic/
Dsnic_trc.c125 void *tbuf = NULL; in snic_trc_init() local
129 tbuf = vzalloc(tbuf_sz); in snic_trc_init()
130 if (!tbuf) { in snic_trc_init()
138 trc->buf = (struct snic_trc_data *) tbuf; in snic_trc_init()
/drivers/mtd/ubi/
Dcdev.c179 void *tbuf; in vol_cdev_read() local
204 tbuf = vmalloc(tbuf_size); in vol_cdev_read()
205 if (!tbuf) in vol_cdev_read()
217 err = ubi_eba_read_leb(ubi, vol, lnum, tbuf, off, len, 0); in vol_cdev_read()
230 err = copy_to_user(buf, tbuf, len); in vol_cdev_read()
240 vfree(tbuf); in vol_cdev_read()
256 char *tbuf; in vol_cdev_direct_write() local
285 tbuf = vmalloc(tbuf_size); in vol_cdev_direct_write()
286 if (!tbuf) in vol_cdev_direct_write()
297 err = copy_from_user(tbuf, buf, len); in vol_cdev_direct_write()
[all …]
/drivers/w1/masters/
Dds2490.c871 u8 *tbuf; in ds9490r_write_block() local
876 tbuf = kmemdup(buf, len, GFP_KERNEL); in ds9490r_write_block()
877 if (!tbuf) in ds9490r_write_block()
880 ds_write_block(dev, tbuf, len); in ds9490r_write_block()
882 kfree(tbuf); in ds9490r_write_block()
889 u8 *tbuf; in ds9490r_read_block() local
894 tbuf = kmalloc(len, GFP_KERNEL); in ds9490r_read_block()
895 if (!tbuf) in ds9490r_read_block()
898 err = ds_read_block(dev, tbuf, len); in ds9490r_read_block()
900 memcpy(buf, tbuf, len); in ds9490r_read_block()
[all …]
/drivers/iio/adc/
Dad9467.c129 unsigned char tbuf[2], rbuf[1]; in ad9467_spi_read() local
132 tbuf[0] = 0x80 | (reg >> 8); in ad9467_spi_read()
133 tbuf[1] = reg & 0xFF; in ad9467_spi_read()
136 tbuf, ARRAY_SIZE(tbuf), in ad9467_spi_read()
/drivers/crypto/hisilicon/zip/
Dzip_main.c420 char tbuf[HZIP_BUF_SIZE]; in hisi_zip_ctrl_debug_read() local
437 ret = scnprintf(tbuf, sizeof(tbuf), "%u\n", val); in hisi_zip_ctrl_debug_read()
438 return simple_read_from_buffer(buf, count, pos, tbuf, ret); in hisi_zip_ctrl_debug_read()
446 char tbuf[HZIP_BUF_SIZE]; in hisi_zip_ctrl_debug_write() local
456 len = simple_write_to_buffer(tbuf, HZIP_BUF_SIZE - 1, pos, buf, count); in hisi_zip_ctrl_debug_write()
460 tbuf[len] = '\0'; in hisi_zip_ctrl_debug_write()
461 if (kstrtoul(tbuf, 0, &val)) in hisi_zip_ctrl_debug_write()
/drivers/net/wireless/ath/carl9170/
Drx.c879 u8 *tbuf; in carl9170_rx_stream() local
881 tbuf = buf; in carl9170_rx_stream()
885 rx_stream = (void *) tbuf; in carl9170_rx_stream()
905 __carl9170_rx(ar, tbuf, tlen); in carl9170_rx_stream()
920 skb_put_data(ar->rx_failover, tbuf, tlen); in carl9170_rx_stream()
962 skb_put_data(ar->rx_failover, tbuf, tlen); in carl9170_rx_stream()
968 tbuf += wlen + 4; in carl9170_rx_stream()
/drivers/staging/comedi/drivers/
Ddt9812.c244 void *tbuf; in dt9812_read_info() local
248 tbuf = kzalloc(tbuf_size, GFP_KERNEL); in dt9812_read_info()
249 if (!tbuf) in dt9812_read_info()
252 cmd = tbuf; in dt9812_read_info()
266 tbuf, buf_size, &count, DT9812_USB_TIMEOUT); in dt9812_read_info()
269 memcpy(buf, tbuf, buf_size); in dt9812_read_info()
274 kfree(tbuf); in dt9812_read_info()
/drivers/infiniband/hw/hfi1/
Duser_exp_rcv.c60 struct tid_user_buf *tbuf,
702 static int program_rcvarray(struct hfi1_filedata *fd, struct tid_user_buf *tbuf, in program_rcvarray() argument
745 npages = tbuf->psets[setidx].count; in program_rcvarray()
746 pageidx = tbuf->psets[setidx].idx; in program_rcvarray()
748 ret = set_rcvarray_entry(fd, tbuf, in program_rcvarray()
771 struct tid_user_buf *tbuf, in set_rcvarray_entry() argument
780 struct page **pages = tbuf->pages + pageidx; in set_rcvarray_entry()
814 tbuf->vaddr + (pageidx * PAGE_SIZE), npages * PAGE_SIZE, in set_rcvarray_entry()
/drivers/usb/core/
Dmessage.c910 static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf) in usb_get_langid() argument
920 err = usb_string_sub(dev, 0, 0, tbuf); in usb_get_langid()
943 dev->string_langid = tbuf[2] | (tbuf[3] << 8); in usb_get_langid()
969 unsigned char *tbuf; in usb_string() local
979 tbuf = kmalloc(256, GFP_NOIO); in usb_string()
980 if (!tbuf) in usb_string()
983 err = usb_get_langid(dev, tbuf); in usb_string()
987 err = usb_string_sub(dev, dev->string_langid, index, tbuf); in usb_string()
992 err = utf16s_to_utf8s((wchar_t *) &tbuf[2], (err - 2) / 2, in usb_string()
996 if (tbuf[1] != USB_DT_STRING) in usb_string()
[all …]
Ddevio.c1120 unsigned char *tbuf; in do_proc_control() local
1135 tbuf = (unsigned char *)__get_free_page(GFP_KERNEL); in do_proc_control()
1136 if (!tbuf) { in do_proc_control()
1153 tbuf, ctrl->wLength, tmo); in do_proc_control()
1156 tbuf, max(i, 0)); in do_proc_control()
1158 if (copy_to_user(ctrl->data, tbuf, i)) { in do_proc_control()
1165 if (copy_from_user(tbuf, ctrl->data, ctrl->wLength)) { in do_proc_control()
1172 tbuf, ctrl->wLength); in do_proc_control()
1177 tbuf, ctrl->wLength, tmo); in do_proc_control()
1189 free_page((unsigned long) tbuf); in do_proc_control()
[all …]
Dhcd.c488 u8 *tbuf = NULL; in rh_call_control() local
514 tbuf = kzalloc(tbuf_size, GFP_KERNEL); in rh_call_control()
515 if (!tbuf) { in rh_call_control()
520 bufp = tbuf; in rh_call_control()
545 tbuf[0] = (device_may_wakeup(&hcd->self.root_hub->dev) in rh_call_control()
548 tbuf[1] = 0; in rh_call_control()
565 tbuf[0] = 1; in rh_call_control()
634 tbuf[0] = 0; in rh_call_control()
651 tbuf[0] = 0; in rh_call_control()
652 tbuf[1] = 0; in rh_call_control()
[all …]
/drivers/i2c/busses/
Di2c-qcom-cci.c102 u16 tbuf; /* bus free time between a STOP and START condition */ member
285 val = hw->tbuf; in cci_init()
712 .tbuf = 118,
724 .tbuf = 32,
746 .tbuf = 227,
758 .tbuf = 62,
770 .tbuf = 24,
/drivers/crypto/hisilicon/sec2/
Dsec_main.c492 char tbuf[SEC_DBGFS_VAL_MAX_LEN]; in sec_debug_read() local
511 ret = snprintf(tbuf, SEC_DBGFS_VAL_MAX_LEN, "%u\n", val); in sec_debug_read()
513 return simple_read_from_buffer(buf, count, pos, tbuf, ret); in sec_debug_read()
520 char tbuf[SEC_DBGFS_VAL_MAX_LEN]; in sec_debug_write() local
530 len = simple_write_to_buffer(tbuf, SEC_DBGFS_VAL_MAX_LEN - 1, in sec_debug_write()
535 tbuf[len] = '\0'; in sec_debug_write()
536 if (kstrtoul(tbuf, 0, &val)) in sec_debug_write()
/drivers/crypto/hisilicon/hpre/
Dhpre_main.c475 char tbuf[HPRE_DBGFS_VAL_MAX_LEN]; in hpre_ctrl_debug_read() local
495 ret = snprintf(tbuf, HPRE_DBGFS_VAL_MAX_LEN, "%u\n", val); in hpre_ctrl_debug_read()
496 return simple_read_from_buffer(buf, count, pos, tbuf, ret); in hpre_ctrl_debug_read()
503 char tbuf[HPRE_DBGFS_VAL_MAX_LEN]; in hpre_ctrl_debug_write() local
513 len = simple_write_to_buffer(tbuf, HPRE_DBGFS_VAL_MAX_LEN - 1, in hpre_ctrl_debug_write()
518 tbuf[len] = '\0'; in hpre_ctrl_debug_write()
519 if (kstrtoul(tbuf, 0, &val)) in hpre_ctrl_debug_write()
/drivers/soc/qcom/
Dcpr.c1273 char tbuf[32]; in cpr_get_fuses() local
1275 snprintf(tbuf, 32, "cpr_ring_osc%d", i + 1); in cpr_get_fuses()
1276 fuses[i].ring_osc = devm_kstrdup(drv->dev, tbuf, GFP_KERNEL); in cpr_get_fuses()
1280 snprintf(tbuf, 32, "cpr_init_voltage%d", i + 1); in cpr_get_fuses()
1281 fuses[i].init_voltage = devm_kstrdup(drv->dev, tbuf, in cpr_get_fuses()
1286 snprintf(tbuf, 32, "cpr_quotient%d", i + 1); in cpr_get_fuses()
1287 fuses[i].quotient = devm_kstrdup(drv->dev, tbuf, GFP_KERNEL); in cpr_get_fuses()
1291 snprintf(tbuf, 32, "cpr_quotient_offset%d", i + 1); in cpr_get_fuses()
1292 fuses[i].quotient_offset = devm_kstrdup(drv->dev, tbuf, in cpr_get_fuses()
/drivers/misc/cxl/
Dguest.c677 void *tbuf = NULL; in guest_afu_read_err_buffer() local
680 tbuf = (void *) get_zeroed_page(GFP_KERNEL); in guest_afu_read_err_buffer()
681 if (!tbuf) in guest_afu_read_err_buffer()
686 virt_to_phys(tbuf), in guest_afu_read_err_buffer()
693 memcpy(buf, tbuf, count); in guest_afu_read_err_buffer()
695 free_page((u64)tbuf); in guest_afu_read_err_buffer()
/drivers/net/wireless/ath/ath6kl/
Dsdio.c413 u8 *tbuf = NULL; in ath6kl_sdio_read_write_sync() local
424 tbuf = ar_sdio->dma_buffer; in ath6kl_sdio_read_write_sync()
427 memcpy(tbuf, buf, len); in ath6kl_sdio_read_write_sync()
431 tbuf = buf; in ath6kl_sdio_read_write_sync()
434 ret = ath6kl_sdio_io(ar_sdio->func, request, addr, tbuf, len); in ath6kl_sdio_read_write_sync()
436 memcpy(buf, tbuf, len); in ath6kl_sdio_read_write_sync()
/drivers/media/usb/pvrusb2/
Dpvrusb2-v4l2.c1089 char *tbuf; in pvr2_v4l2_read() local
1094 tbuf = kmalloc(PAGE_SIZE,GFP_KERNEL); in pvr2_v4l2_read()
1095 if (!tbuf) return -ENOMEM; in pvr2_v4l2_read()
1100 c2 = pvr2_hdw_cpufw_get(hdw,offs,tbuf,c1); in pvr2_v4l2_read()
1106 if (copy_to_user(buff,tbuf,c2)) { in pvr2_v4l2_read()
1116 kfree(tbuf); in pvr2_v4l2_read()
/drivers/target/
Dtarget_core_spc.c1123 unsigned char tbuf[SE_MODE_PAGE_BUF]; in spc_emulate_modeselect() local
1151 memset(tbuf, 0, SE_MODE_PAGE_BUF); in spc_emulate_modeselect()
1152 length = modesense_handlers[i].emulate(cmd, 0, tbuf); in spc_emulate_modeselect()
1165 if (memcmp(buf + off, tbuf, length)) in spc_emulate_modeselect()

12