Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 25 of 68) sorted by relevance

123

/Linux-v4.19/tools/power/acpi/tools/ec/
Dec_access.c130 int byte_off, bytes_read; in dump_ec() local
132 bytes_read = read(fd, buf, EC_SPACE_SIZE); in dump_ec()
134 if (bytes_read == -1) in dump_ec()
137 if (bytes_read != EC_SPACE_SIZE) in dump_ec()
138 fprintf(stderr, "Could only read %d bytes\n", bytes_read); in dump_ec()
141 for (byte_off = 0; byte_off < bytes_read; byte_off++) { in dump_ec()
155 bytes_read = read(fd, buf2, EC_SPACE_SIZE); in dump_ec()
157 if (bytes_read == -1) in dump_ec()
160 if (bytes_read != EC_SPACE_SIZE) in dump_ec()
161 fprintf(stderr, "Could only read %d bytes\n", bytes_read); in dump_ec()
[all …]
/Linux-v4.19/tools/perf/scripts/perl/
Drwtop.pl44 $reads{$common_pid}{bytes_read} += $ret;
46 if (!defined ($reads{$common_pid}{bytes_read})) {
47 $reads{$common_pid}{bytes_read} = 0;
136 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=>
137 ($reads{$a}{bytes_read} || 0) } keys %reads) {
141 my $bytes_read = $reads{$pid}{bytes_read} || 0;
144 $total_reads, $bytes_requested, $bytes_read);
Drw-by-pid.pl31 $reads{$common_pid}{bytes_read} += $ret;
33 if (!defined ($reads{$common_pid}{bytes_read})) {
34 $reads{$common_pid}{bytes_read} = 0;
82 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=>
83 ($reads{$a}{bytes_read} || 0) } keys %reads) {
87 my $bytes_read = $reads{$pid}{bytes_read} || 0;
90 $total_reads, $bytes_requested, $bytes_read);
/Linux-v4.19/drivers/usb/misc/
Didmouse.c126 int bytes_read; in idmouse_create_image() local
131 bytes_read = sizeof(HEADER)-1; in idmouse_create_image()
160 while (bytes_read < IMGSIZE) { in idmouse_create_image()
163 dev->bulk_in_buffer + bytes_read, in idmouse_create_image()
178 bytes_read += bulk_read; in idmouse_create_image()
187 for (bytes_read = sizeof(HEADER)-1 + WIDTH-1; bytes_read < IMGSIZE; bytes_read += WIDTH) in idmouse_create_image()
188 if (dev->bulk_in_buffer[bytes_read] != 0x00) in idmouse_create_image()
192 for (bytes_read = IMGSIZE-WIDTH; bytes_read < IMGSIZE-1; bytes_read++) in idmouse_create_image()
193 if (dev->bulk_in_buffer[bytes_read] != 0xFF) in idmouse_create_image()
198 bytes_read); in idmouse_create_image()
Dadutux.c344 size_t bytes_read = 0; in adu_read() local
389 bytes_read += (amount - i); in adu_read()
437 retval = bytes_read ? bytes_read : -ENOMEM; in adu_read()
462 retval = bytes_read ? bytes_read : -ETIMEDOUT; in adu_read()
470 retval = bytes_read ? bytes_read : -EINTR; in adu_read()
477 retval = bytes_read; in adu_read()
/Linux-v4.19/drivers/char/
Dadi.c57 size_t ver_buf_sz, bytes_read = 0; in adi_read() local
70 while (bytes_read < count) { in adi_read()
80 if (copy_to_user(buf + bytes_read, ver_buf, in adi_read()
86 bytes_read += ver_buf_sz; in adi_read()
89 ver_buf_sz = min(count - bytes_read, in adi_read()
94 (*offp) += bytes_read; in adi_read()
95 ret = bytes_read; in adi_read()
Dppdev.c125 ssize_t bytes_read = 0; in pp_read() local
150 while (bytes_read == 0) { in pp_read()
166 bytes_read = (*fn)(pport, kbuffer, need, flags); in pp_read()
168 bytes_read = parport_read(pport, kbuffer, need); in pp_read()
171 if (bytes_read != 0) in pp_read()
175 bytes_read = -EAGAIN; in pp_read()
180 bytes_read = -ERESTARTSYS; in pp_read()
189 if (bytes_read > 0 && copy_to_user(buf, kbuffer, bytes_read)) in pp_read()
190 bytes_read = -EFAULT; in pp_read()
194 return bytes_read; in pp_read()
/Linux-v4.19/drivers/net/ethernet/cavium/liquidio/
Docteon_console.c436 s32 bytes_read) in output_console_line() argument
443 for (i = 0; i < bytes_read; i++) { in output_console_line()
471 if (line != &console_buffer[bytes_read]) { in output_console_line()
472 console_buffer[bytes_read] = '\0'; in output_console_line()
481 s32 bytes_read, tries, total_read; in check_console() local
497 bytes_read = in check_console()
500 if (bytes_read > 0) { in check_console()
501 total_read += bytes_read; in check_console()
506 console_buffer, bytes_read); in check_console()
508 } else if (bytes_read < 0) { in check_console()
[all …]
/Linux-v4.19/drivers/net/wireless/ath/ath9k/
Drng.c76 int bytes_read; in ath9k_rng_kthread() local
86 bytes_read = ath9k_rng_data_read(sc, rng_buf, in ath9k_rng_kthread()
88 if (unlikely(!bytes_read)) { in ath9k_rng_kthread()
99 add_hwgenerator_randomness((void *)rng_buf, bytes_read, in ath9k_rng_kthread()
100 ATH9K_RNG_ENTROPY(bytes_read)); in ath9k_rng_kthread()
/Linux-v4.19/fs/befs/
Ddatastream.c133 befs_off_t bytes_read = 0; /* bytes readed */ in befs_read_lsymlink() local
139 while (bytes_read < len) { in befs_read_lsymlink()
140 bh = befs_read_datastream(sb, ds, bytes_read, NULL); in befs_read_lsymlink()
143 "starting from %llu", bytes_read); in befs_read_lsymlink()
145 return bytes_read; in befs_read_lsymlink()
148 plen = ((bytes_read + BEFS_SB(sb)->block_size) < len) ? in befs_read_lsymlink()
149 BEFS_SB(sb)->block_size : len - bytes_read; in befs_read_lsymlink()
150 memcpy(buff + bytes_read, bh->b_data, plen); in befs_read_lsymlink()
152 bytes_read += plen; in befs_read_lsymlink()
156 bytes_read); in befs_read_lsymlink()
[all …]
/Linux-v4.19/tools/testing/selftests/sparc64/drivers/
Dadi-test.c186 int ret, bytes_read = 0; in read_adi() local
191 ret = read(fd, buf + bytes_read, buf_sz - bytes_read); in read_adi()
198 bytes_read += ret; in read_adi()
200 } while (bytes_read < buf_sz); in read_adi()
203 DEBUG_PRINT_L3("\tRead %d bytes\n", bytes_read); in read_adi()
205 return bytes_read; in read_adi()
211 int ret, i, bytes_read = 0; in pread_adi() local
218 ret = pread(fd, buf + bytes_read, buf_sz - bytes_read, in pread_adi()
226 bytes_read += ret; in pread_adi()
229 } while (bytes_read < buf_sz); in pread_adi()
[all …]
/Linux-v4.19/drivers/mtd/parsers/
Dparser_trx.c36 size_t bytes_read; in parser_trx_data_part_name() local
39 err = mtd_read(master, offset, sizeof(buf), &bytes_read, in parser_trx_data_part_name()
61 size_t bytes_read; in parser_trx_parse() local
70 err = mtd_read(mtd, 0, sizeof(trx), &bytes_read, (uint8_t *)&trx); in parser_trx_parse()
/Linux-v4.19/drivers/firmware/
Ddell_rbu.c263 int length, int bytes_read, int *list_read_count) in do_packet_read() argument
273 if (*list_read_count > bytes_read) { in do_packet_read()
275 j = newpacket->length - (*list_read_count - bytes_read); in do_packet_read()
282 if (length > (*list_read_count - bytes_read)) in do_packet_read()
287 bytes_copied = (*list_read_count - bytes_read); in do_packet_read()
301 int bytes_read = 0; in packet_read_list() local
310 bytes_read = rbu_data.packet_read_count; in packet_read_list()
315 remaining_bytes, bytes_read, &temp_count); in packet_read_list()
317 bytes_read += bytes_copied; in packet_read_list()
329 *pread_length = bytes_read - rbu_data.packet_read_count; in packet_read_list()
[all …]
/Linux-v4.19/drivers/char/hw_random/
Dcore.c66 int bytes_read; in add_early_randomness() local
70 bytes_read = rng_get_data(rng, rng_buffer, size, 1); in add_early_randomness()
72 if (bytes_read > 0) in add_early_randomness()
73 add_device_randomness(rng_buffer, bytes_read); in add_early_randomness()
206 int bytes_read, len; in rng_dev_read() local
225 bytes_read = rng_get_data(rng, rng_buffer, in rng_dev_read()
228 if (bytes_read < 0) { in rng_dev_read()
229 err = bytes_read; in rng_dev_read()
232 data_avail = bytes_read; in rng_dev_read()
/Linux-v4.19/Documentation/usb/
Dgadget_printer.txt209 int bytes_read;
218 bytes_read = read(fd[0].fd, buf, BUF_SIZE);
220 if (bytes_read < 0) {
225 } else if (bytes_read > 0) {
227 fwrite(buf, 1, bytes_read, stdout);
261 int bytes_read = fread(buf, 1, BUF_SIZE, stdin);
263 if (!bytes_read) {
267 while (bytes_read) {
274 retval = write(fd[0].fd, buf, bytes_read);
282 bytes_read -= retval;
[all …]
/Linux-v4.19/drivers/ps3/
Dps3-vuart.c394 unsigned int bytes, u64 *bytes_read) in ps3_vuart_raw_read() argument
402 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_read); in ps3_vuart_raw_read()
410 priv->stats.bytes_read += *bytes_read; in ps3_vuart_raw_read()
413 *bytes_read, bytes, priv->stats.bytes_read); in ps3_vuart_raw_read()
460 priv->stats.bytes_read -= bytes_waiting; in ps3_vuart_clear_rx_bytes()
617 unsigned long bytes_read; in ps3_vuart_read() local
640 bytes_read = min((unsigned int)(lb->tail - lb->head), bytes); in ps3_vuart_read()
642 memcpy(buf, lb->head, bytes_read); in ps3_vuart_read()
643 buf += bytes_read; in ps3_vuart_read()
644 bytes -= bytes_read; in ps3_vuart_read()
[all …]
/Linux-v4.19/drivers/net/ethernet/netronome/nfp/
Dnfp_net_debugdump.c190 int bytes_read; in nfp_net_dump_load_dumpspec() local
207 bytes_read = nfp_cpp_read(cpp, cpp_id, specsym->addr, dumpspec->data, in nfp_net_dump_load_dumpspec()
209 if (bytes_read != specsym->size) { in nfp_net_dump_load_dumpspec()
495 int bytes_read; in nfp_dump_csr_range() local
524 bytes_read = nfp_cpp_read(pf->cpp, cpp_id, cpp_rd_addr, in nfp_dump_csr_range()
526 err = bytes_read == reg_sz ? 0 : -EIO; in nfp_dump_csr_range()
646 int bytes_read; in nfp_dump_single_rtsym() local
689 bytes_read = nfp_cpp_read(pf->cpp, cpp_id, sym->addr, dest, in nfp_dump_single_rtsym()
691 if (bytes_read != sym_size) { in nfp_dump_single_rtsym()
692 if (bytes_read >= 0) in nfp_dump_single_rtsym()
[all …]
/Linux-v4.19/drivers/mtd/
Dbcm47xxpart.c97 size_t bytes_read; in bcm47xxpart_parse() local
138 &bytes_read, (uint8_t *)buf); in bcm47xxpart_parse()
240 err = mtd_read(master, offset + 0x8000, 0x4, &bytes_read, in bcm47xxpart_parse()
264 err = mtd_read(master, offset, 0x4, &bytes_read, in bcm47xxpart_parse()
/Linux-v4.19/tools/perf/tests/
Dcode-reading.c45 size_t bytes_read = 0; in read_objdump_chunk() local
64 bytes_read++; in read_objdump_chunk()
79 if (bytes_read > 1 && !bigendian()) { in read_objdump_chunk()
80 unsigned char *chunk_end = chunk_start + bytes_read - 1; in read_objdump_chunk()
92 return bytes_read; in read_objdump_chunk()
99 size_t ret, bytes_read = 0; in read_objdump_line() local
116 bytes_read += ret; in read_objdump_line()
121 return bytes_read; in read_objdump_line()
/Linux-v4.19/drivers/tty/serial/
Dsunhv.c125 unsigned long bytes_read, i; in receive_chars_read() local
126 long stat = sun4v_con_read(ra, PAGE_SIZE, &bytes_read); in receive_chars_read()
129 bytes_read = 0; in receive_chars_read()
139 bytes_read = 1; in receive_chars_read()
156 for (i = 0; i < bytes_read; i++) in receive_chars_read()
164 port->icount.rx += bytes_read; in receive_chars_read()
167 bytes_read); in receive_chars_read()
/Linux-v4.19/drivers/pci/hotplug/
Dacpiphp_ibm.c359 int bytes_read = -EINVAL; in ibm_read_apci_table() local
365 bytes_read = ibm_get_table_from_acpi(&table); in ibm_read_apci_table()
366 if (bytes_read > 0 && bytes_read <= size) in ibm_read_apci_table()
367 memcpy(buffer, table, bytes_read); in ibm_read_apci_table()
370 return bytes_read; in ibm_read_apci_table()
/Linux-v4.19/drivers/media/rc/
Dredrat3.c238 u16 bytes_read; member
634 rr3->bytes_read = len; in redrat3_read_packet_start()
636 rr3->bytes_read, pktlen); in redrat3_read_packet_start()
650 if (len + rr3->bytes_read > sizeof(rr3->irdata)) { in redrat3_read_packet_continue()
652 rr3->bytes_read = 0; in redrat3_read_packet_continue()
656 memcpy(irdata + rr3->bytes_read, rr3->bulk_in_buf, len); in redrat3_read_packet_continue()
658 rr3->bytes_read += len; in redrat3_read_packet_continue()
659 dev_dbg(rr3->dev, "bytes_read %d, pktlen %d\n", rr3->bytes_read, in redrat3_read_packet_continue()
670 if (rr3->bytes_read == 0 && len >= sizeof(struct redrat3_header)) { in redrat3_get_ir_data()
672 } else if (rr3->bytes_read != 0) { in redrat3_get_ir_data()
[all …]
/Linux-v4.19/fs/cifs/
Dlink.c222 unsigned int bytes_read = 0; in query_mf_symlink() local
230 cifs_sb, path, buf, &bytes_read); in query_mf_symlink()
237 if (bytes_read == 0) { /* not a symlink */ in query_mf_symlink()
242 rc = parse_mf_symlink(buf, bytes_read, &link_len, symlinkinfo); in query_mf_symlink()
256 unsigned int bytes_read = 0; in check_mf_symlink() local
268 cifs_sb, path, buf, &bytes_read); in check_mf_symlink()
275 if (bytes_read == 0) /* not a symlink */ in check_mf_symlink()
278 rc = parse_mf_symlink(buf, bytes_read, &link_len, NULL); in check_mf_symlink()
/Linux-v4.19/drivers/nvmem/
Dbcm-ocotp.c166 u32 bytes_read; in bcm_otpc_read() local
170 for (bytes_read = 0; bytes_read < bytes;) { in bcm_otpc_read()
183 bytes_read += sizeof(*buf); in bcm_otpc_read()
/Linux-v4.19/drivers/video/fbdev/omap2/omapfb/displays/
Dconnector-dvi.c180 int r, l, bytes_read; in dvic_read_edid() local
190 bytes_read = l; in dvic_read_edid()
201 bytes_read += l; in dvic_read_edid()
204 return bytes_read; in dvic_read_edid()

123