summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_logging.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2020-08-18 14:14:25 +0200
committerMaxime Ripard <maxime@cerno.tech>2020-08-18 14:14:25 +0200
commitd85ddd1318e66c0c2665dbfcbc21a8b66c9152aa (patch)
treee49e401abd2468b398d4bc84c7e05c2c2c3b0966 /drivers/scsi/scsi_logging.c
parentMAINTAINERS: Change maintainer for hisilicon DRM driver (diff)
parentLinux 5.9-rc1 (diff)
downloadlinux-d85ddd1318e66c0c2665dbfcbc21a8b66c9152aa.tar.xz
linux-d85ddd1318e66c0c2665dbfcbc21a8b66c9152aa.zip
Merge v5.9-rc1 into drm-misc-next
Sam needs 5.9-rc1 to have dev_err_probe in to merge some patches. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'drivers/scsi/scsi_logging.c')
-rw-r--r--drivers/scsi/scsi_logging.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/scsi/scsi_logging.c b/drivers/scsi/scsi_logging.c
index c91fa3feb930..8ea44c6595ef 100644
--- a/drivers/scsi/scsi_logging.c
+++ b/drivers/scsi/scsi_logging.c
@@ -205,13 +205,9 @@ void scsi_print_command(struct scsi_cmnd *cmd)
/* Print opcode in one line and use separate lines for CDB */
off += scnprintf(logbuf + off, logbuf_len - off, "\n");
dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf);
- scsi_log_release_buffer(logbuf);
for (k = 0; k < cmd->cmd_len; k += 16) {
size_t linelen = min(cmd->cmd_len - k, 16);
- logbuf = scsi_log_reserve_buffer(&logbuf_len);
- if (!logbuf)
- break;
off = sdev_format_header(logbuf, logbuf_len,
scmd_name(cmd),
cmd->request->tag);
@@ -224,9 +220,8 @@ void scsi_print_command(struct scsi_cmnd *cmd)
}
dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s",
logbuf);
- scsi_log_release_buffer(logbuf);
}
- return;
+ goto out;
}
if (!WARN_ON(off > logbuf_len - 49)) {
off += scnprintf(logbuf + off, logbuf_len - off, " ");
@@ -236,6 +231,7 @@ void scsi_print_command(struct scsi_cmnd *cmd)
}
out_printk:
dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf);
+out:
scsi_log_release_buffer(logbuf);
}
EXPORT_SYMBOL(scsi_print_command);