Lines Matching refs:off
38 size_t off = 0; in sdev_format_header() local
41 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
44 if (WARN_ON(off >= logbuf_len)) in sdev_format_header()
45 return off; in sdev_format_header()
48 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
50 return off; in sdev_format_header()
58 size_t off = 0, logbuf_len; in sdev_prefix_printk() local
68 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_prefix_printk()
70 if (!WARN_ON(off >= logbuf_len)) { in sdev_prefix_printk()
72 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); in sdev_prefix_printk()
85 size_t off = 0, logbuf_len; in scmd_printk() local
93 off = sdev_format_header(logbuf, logbuf_len, scmd_name(scmd), in scmd_printk()
95 if (off < logbuf_len) { in scmd_printk()
97 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); in scmd_printk()
110 size_t off; in scsi_format_opcode_name() local
117 off = scnprintf(buffer, buf_len, in scsi_format_opcode_name()
120 return off; in scsi_format_opcode_name()
128 off = scnprintf(buffer, buf_len, "%s", cdb_name); in scsi_format_opcode_name()
130 off = scnprintf(buffer, buf_len, "opcode=0x%x", cdb0); in scsi_format_opcode_name()
131 if (WARN_ON(off >= buf_len)) in scsi_format_opcode_name()
132 return off; in scsi_format_opcode_name()
134 off += scnprintf(buffer + off, buf_len - off, in scsi_format_opcode_name()
137 off += scnprintf(buffer + off, buf_len - off, in scsi_format_opcode_name()
142 off = scnprintf(buffer, buf_len, "%s", sa_name); in scsi_format_opcode_name()
144 off = scnprintf(buffer, buf_len, "%s, sa=0x%x", in scsi_format_opcode_name()
147 off = scnprintf(buffer, buf_len, in scsi_format_opcode_name()
150 WARN_ON(off >= buf_len); in scsi_format_opcode_name()
151 return off; in scsi_format_opcode_name()
158 size_t off; in __scsi_format_command() local
160 off = scsi_format_opcode_name(logbuf, logbuf_len, cdb); in __scsi_format_command()
161 if (off >= logbuf_len) in __scsi_format_command()
162 return off; in __scsi_format_command()
168 if (off > logbuf_len - 3) in __scsi_format_command()
170 off += scnprintf(logbuf + off, logbuf_len - off, in __scsi_format_command()
173 return off; in __scsi_format_command()
181 size_t off, logbuf_len; in scsi_print_command() local
190 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_command()
192 if (off >= logbuf_len) in scsi_print_command()
194 off += scnprintf(logbuf + off, logbuf_len - off, "CDB: "); in scsi_print_command()
195 if (WARN_ON(off >= logbuf_len)) in scsi_print_command()
198 off += scsi_format_opcode_name(logbuf + off, logbuf_len - off, in scsi_print_command()
200 if (off >= logbuf_len) in scsi_print_command()
206 off += scnprintf(logbuf + off, logbuf_len - off, "\n"); in scsi_print_command()
211 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_command()
214 if (!WARN_ON(off > logbuf_len - 58)) { in scsi_print_command()
215 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_command()
218 16, 1, logbuf + off, in scsi_print_command()
219 logbuf_len - off, false); in scsi_print_command()
226 if (!WARN_ON(off > logbuf_len - 49)) { in scsi_print_command()
227 off += scnprintf(logbuf + off, logbuf_len - off, " "); in scsi_print_command()
229 logbuf + off, logbuf_len - off, in scsi_print_command()
243 size_t off = 0; in scsi_format_extd_sense() local
249 off = scnprintf(buffer, buf_len, "Add. Sense: %s", in scsi_format_extd_sense()
252 off += scnprintf(buffer + off, buf_len - off, in scsi_format_extd_sense()
256 off = scnprintf(buffer, buf_len, "<<vendor>>"); in scsi_format_extd_sense()
257 off += scnprintf(buffer + off, buf_len - off, in scsi_format_extd_sense()
260 off += scnprintf(buffer + off, buf_len - off, in scsi_format_extd_sense()
262 off += scnprintf(buffer + off, buf_len - off, in scsi_format_extd_sense()
265 return off; in scsi_format_extd_sense()
273 size_t off; in scsi_format_sense_hdr() local
275 off = scnprintf(buffer, buf_len, "Sense Key : "); in scsi_format_sense_hdr()
278 off += scnprintf(buffer + off, buf_len - off, in scsi_format_sense_hdr()
281 off += scnprintf(buffer + off, buf_len - off, in scsi_format_sense_hdr()
283 off += scnprintf(buffer + off, buf_len - off, in scsi_format_sense_hdr()
287 off += scnprintf(buffer + off, buf_len - off, "[descriptor] "); in scsi_format_sense_hdr()
288 return off; in scsi_format_sense_hdr()
305 size_t off; in scsi_log_dump_sense() local
307 off = sdev_format_header(logbuf, logbuf_len, in scsi_log_dump_sense()
310 logbuf + off, logbuf_len - off, in scsi_log_dump_sense()
322 size_t off, logbuf_len; in scsi_log_print_sense_hdr() local
327 off = sdev_format_header(logbuf, logbuf_len, name, tag); in scsi_log_print_sense_hdr()
328 off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr); in scsi_log_print_sense_hdr()
335 off = sdev_format_header(logbuf, logbuf_len, name, tag); in scsi_log_print_sense_hdr()
336 off += scsi_format_extd_sense(logbuf + off, logbuf_len - off, in scsi_log_print_sense_hdr()
385 size_t off, logbuf_len; in scsi_print_result() local
395 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_result()
398 if (off >= logbuf_len) in scsi_print_result()
402 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
404 if (WARN_ON(off >= logbuf_len)) in scsi_print_result()
408 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
411 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
413 if (WARN_ON(off >= logbuf_len)) in scsi_print_result()
416 off += scnprintf(logbuf + off, logbuf_len - off, "Result: "); in scsi_print_result()
417 if (WARN_ON(off >= logbuf_len)) in scsi_print_result()
421 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
424 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
426 if (WARN_ON(off >= logbuf_len)) in scsi_print_result()
430 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
433 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
437 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()