aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2016-10-22 20:32:30 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-08 17:29:57 -0500
commitdf441cc030545fe8a5f6891e3767990f761e1600 (patch)
tree64733b2fba214725db60a6894347f4fc8064856f /drivers/scsi/sd.c
parent1bc504552e20d268d91af4560c1109207d5af295 (diff)
scsi: replace custom approach to hexdump small buffers
In kernel we have defined specifier (%*ph[C]) to dump small buffers in a hex format. Replace custom approach by a generic one. Cc: Jon Mason <jonmason@broadcom.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 51e56296f465..b4933afe08a1 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2419,9 +2419,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)
if (sdkp->first_scan || old_wp != sdkp->write_prot) {
sd_printk(KERN_NOTICE, sdkp, "Write Protect is %s\n",
sdkp->write_prot ? "on" : "off");
- sd_printk(KERN_DEBUG, sdkp,
- "Mode Sense: %02x %02x %02x %02x\n",
- buffer[0], buffer[1], buffer[2], buffer[3]);
+ sd_printk(KERN_DEBUG, sdkp, "Mode Sense: %4ph\n", buffer);
}
}
}