Merge tag 'riscv-for-linus-4.15-rc4-riscv_fixes' of git://git.kernel.org/pub/scm...
[linux/fpc-iii.git] / drivers / scsi / scsi_debugfs.c
blob01f08c03f2c185dc3f7e1d423c3459da95fb6cbb
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/seq_file.h>
3 #include <scsi/scsi_cmnd.h>
4 #include <scsi/scsi_dbg.h>
5 #include "scsi_debugfs.h"
7 void scsi_show_rq(struct seq_file *m, struct request *rq)
9 struct scsi_cmnd *cmd = container_of(scsi_req(rq), typeof(*cmd), req);
10 int msecs = jiffies_to_msecs(jiffies - cmd->jiffies_at_alloc);
11 char buf[80];
13 __scsi_format_command(buf, sizeof(buf), cmd->cmnd, cmd->cmd_len);
14 seq_printf(m, ", .cmd=%s, .retries=%d, allocated %d.%03d s ago", buf,
15 cmd->retries, msecs / 1000, msecs % 1000);