linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] libata-scsi: use %*ph to dump small buffers
@ 2016-05-06 18:40 Andy Shevchenko
  2016-05-09 16:31 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2016-05-06 18:40 UTC (permalink / raw)
  To: Tejun Heo, linux-ide; +Cc: Andy Shevchenko

Replace custom approach by %*ph specifier to dump small buffers in hex format.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/ata/libata-scsi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index c7d0fc1..5bef807 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3646,14 +3646,11 @@ static inline void ata_scsi_dump_cdb(struct ata_port *ap,
 {
 #ifdef ATA_DEBUG
 	struct scsi_device *scsidev = cmd->device;
-	u8 *scsicmd = cmd->cmnd;
 
-	DPRINTK("CDB (%u:%d,%d,%d) %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+	DPRINTK("CDB (%u:%d,%d,%d) %9ph\n",
 		ap->print_id,
 		scsidev->channel, scsidev->id, scsidev->lun,
-		scsicmd[0], scsicmd[1], scsicmd[2], scsicmd[3],
-		scsicmd[4], scsicmd[5], scsicmd[6], scsicmd[7],
-		scsicmd[8]);
+		cmd->cmnd);
 #endif
 }
 
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-09 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06 18:40 [PATCH v1 1/1] libata-scsi: use %*ph to dump small buffers Andy Shevchenko
2016-05-09 16:31 ` Tejun Heo

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).