From 26f588308efc7f1834b7ee0b1dd4f9a904f555a3 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 6 May 2016 21:40:40 +0300 Subject: libata-scsi: use %*ph to dump small buffers Replace custom approach by %*ph specifier to dump small buffers in hex format. Signed-off-by: Andy Shevchenko Signed-off-by: Tejun Heo --- drivers/ata/libata-scsi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'drivers/ata') diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 90397baaa5f1..7bcc870afeaa 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3439,14 +3439,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 } -- cgit v1.2.3