Discussion:
[PATCH 33/38] libata: use __scsi_print_command()
Hannes Reinecke
2014-09-29 11:59:02 UTC
Permalink
libata already uses an internal buffer, so we should be using
__scsi_print_command() here.

Cc: Tejun Heo <***@kernel.org>
Cc: linux-***@vger.kernel.org
Cc: LKML <linux-***@vger.kernel.org>
Signed-off-by: Hannes Reinecke <***@suse.de>
---
drivers/ata/libata-eh.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index dad83df..74c5652 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2509,15 +2509,11 @@ 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_print_command(cdb_buf, sizeof(cdb_buf),
+ qc->scsicmd->cmnd);
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_print_command(cdb_buf, sizeof(cdb_buf),
+ (unsigned char *)cdb);
} else {
const char *descr = ata_get_cmd_descript(cmd->command);
if (descr)
--
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Tejun Heo
2014-09-29 14:06:06 UTC
Permalink
Post by Hannes Reinecke
libata already uses an internal buffer, so we should be using
__scsi_print_command() here.
Applied to libata/for-3.18.

Thanks.
--
tejun
Hannes Reinecke
2014-09-29 14:10:30 UTC
Permalink
Post by Tejun Heo
Post by Hannes Reinecke
libata already uses an internal buffer, so we should be using
__scsi_print_command() here.
=20
Applied to libata/for-3.18.
=20
Thanks.
=20
Errm.
Nice that you did, but it sort of relies for patches 01-32 to be
applied previously.
I'd rather apply your Signed-off-by: to the patch and have it
routed through the SCSI tree; that way we're sure it'll only be
applied if the previous patches are in.

Can you please pull it from libata to avoid build issues?

Cheers,

Hannes
--=20
Dr. Hannes Reinecke zSeries & Storage
***@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg
GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Tejun Heo
2014-09-29 14:11:44 UTC
Permalink
Post by Hannes Reinecke
Post by Tejun Heo
Post by Hannes Reinecke
libata already uses an internal buffer, so we should be using
__scsi_print_command() here.
Applied to libata/for-3.18.
Thanks.
Errm.
Nice that you did, but it sort of relies for patches 01-32 to be
applied previously.
I'd rather apply your Signed-off-by: to the patch and have it
routed through the SCSI tree; that way we're sure it'll only be
applied if the previous patches are in.
Can you please pull it from libata to avoid build issues?
Ah, okay, pulled it. Please feel free to add

Acked-by: Tejun Heo <***@kernel.org>

Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...