From b3e3d4c618c5b97ca8aa12779df770782be83fb2 Mon Sep 17 00:00:00 2001 From: John Garry Date: Thu, 19 Dec 2019 20:35:57 +0800 Subject: scsi: libsas: Tidy SAS address print format Currently we use a mixture of %016llx, %llx, and %16llx when printing a SAS address. Since the most significant nibble of the SAS address is always 5 - as per standard - this formatting is not so important; but some fake SAS addresses for SATA devices may not be. And we have mangled/invalid address to consider also. And it's better to be consistent in the code, so use a fixed format. The SAS address is a fixed size at 64b, so we want to 0 byte extend to 16 nibbles, so use %016llx globally. Also make some prints to be explicitly hex, and tidy some whitespace issue. Link: https://lore.kernel.org/r/1576758957-227350-1-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen --- drivers/scsi/libsas/sas_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/libsas/sas_task.c') diff --git a/drivers/scsi/libsas/sas_task.c b/drivers/scsi/libsas/sas_task.c index 1ded7d85027e..e2d42593ce52 100644 --- a/drivers/scsi/libsas/sas_task.c +++ b/drivers/scsi/libsas/sas_task.c @@ -27,7 +27,7 @@ void sas_ssp_task_response(struct device *dev, struct sas_task *task, memcpy(tstat->buf, iu->sense_data, tstat->buf_valid_size); if (iu->status != SAM_STAT_CHECK_CONDITION) - dev_warn(dev, "dev %llx sent sense data, but stat(%x) is not CHECK CONDITION\n", + dev_warn(dev, "dev %016llx sent sense data, but stat(0x%x) is not CHECK CONDITION\n", SAS_ADDR(task->dev->sas_addr), iu->status); } else -- cgit