scsi: hisi_sas: Adjust the printk format of functions hisi_sas_init_device()
authorXiang Chen <chenxiang66@hisilicon.com>
Thu, 11 Apr 2019 12:46:39 +0000 (20:46 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 13 Apr 2019 01:30:12 +0000 (21:30 -0400)
In function hisi_sas_init_device(), the log is as follows when error for
hardreset:

  hisi_sas_v3_hw 0000:74:02.0: SATA disk hardreset fail: 0xffffffed

Actually if hardreset failed, its return value is negative, so change the
print format from %x to %d.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c

index d4da537f9a452c10ff21c7413a6ef075f079caa9..ede812759991d2b006d6d0170c110ce876c5b574 100644 (file)
@@ -769,8 +769,7 @@ static int hisi_sas_init_device(struct domain_device *device)
                }
                sas_put_local_phy(local_phy);
                if (rc) {
-                       dev_warn(dev, "SATA disk hardreset fail: 0x%x\n",
-                                rc);
+                       dev_warn(dev, "SATA disk hardreset fail: %d\n", rc);
                        return rc;
                }