* [PATCH 04/10] libata: use __scsi_format_command()
[not found] <1415088409-46590-1-git-send-email-hare@suse.de>
@ 2014-11-04 8:06 ` Hannes Reinecke
2014-11-06 7:02 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2014-11-04 8:06 UTC (permalink / raw)
To: James Bottomley
Cc: Christoph Hellwig, Ewan Milne, Robert Elliott, linux-scsi,
Hannes Reinecke, linux-ide, LKML
libata already uses an internal buffer, so we should be using
__scsi_format_command() here.
Cc: linux-ide@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/ata/libata-eh.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index dad83df..6550a9a 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2509,15 +2509,12 @@ static void ata_eh_link_report(struct ata_link *link)
if (ata_is_atapi(qc->tf.protocol)) {
if (qc->scsicmd)
- scsi_print_command(qc->scsicmd);
+ __scsi_format_command(cdb_buf, sizeof(cdb_buf),
+ qc->scsicmd->cmnd,
+ qc->scsicmd->cmd_len);
else
- snprintf(cdb_buf, sizeof(cdb_buf),
- "cdb %02x %02x %02x %02x %02x %02x %02x %02x "
- "%02x %02x %02x %02x %02x %02x %02x %02x\n ",
- cdb[0], cdb[1], cdb[2], cdb[3],
- cdb[4], cdb[5], cdb[6], cdb[7],
- cdb[8], cdb[9], cdb[10], cdb[11],
- cdb[12], cdb[13], cdb[14], cdb[15]);
+ __scsi_format_command(cdb_buf, sizeof(cdb_buf),
+ cdb, qc->dev->cdb_len);
} else {
const char *descr = ata_get_cmd_descript(cmd->command);
if (descr)
--
1.8.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 04/10] libata: use __scsi_format_command()
2014-11-04 8:06 ` [PATCH 04/10] libata: use __scsi_format_command() Hannes Reinecke
@ 2014-11-06 7:02 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2014-11-06 7:02 UTC (permalink / raw)
To: Hannes Reinecke
Cc: James Bottomley, Christoph Hellwig, Ewan Milne, Robert Elliott,
linux-scsi, linux-ide, LKML
On Tue, Nov 04, 2014 at 09:06:43AM +0100, Hannes Reinecke wrote:
> libata already uses an internal buffer, so we should be using
> __scsi_format_command() here.
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-06 7:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1415088409-46590-1-git-send-email-hare@suse.de>
2014-11-04 8:06 ` [PATCH 04/10] libata: use __scsi_format_command() Hannes Reinecke
2014-11-06 7:02 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).