]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: hisi_sas: Correct printing format issues
authorYihang Li <liyihang9@huawei.com>
Thu, 5 Mar 2026 06:46:59 +0000 (14:46 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 7 Mar 2026 16:20:30 +0000 (11:20 -0500)
There are some print format errors, fix them.

Signed-off-by: Yihang Li <liyihang9@huawei.com>
Link: https://patch.msgid.link/20260305064700.116033-2-liyihang9@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

index 30a9c66126513aa01e9f0f2a6b0e24ebd1dfde97..00e4b59ff711f413a0acd133bb04e16fe20b4a76 100644 (file)
@@ -1326,7 +1326,7 @@ static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func,
 
        if (sts && !wait_for_completion_timeout(&completion,
                HISI_SAS_WAIT_PHYUP_TIMEOUT)) {
-               dev_warn(dev, "phy%d wait phyup timed out for func %d\n",
+               dev_warn(dev, "phy%d wait phyup timed out for func %u\n",
                         phy_no, func);
                if (phy->in_reset)
                        ret = -ETIMEDOUT;
index 2f9e01717ef38971703b6e34d2655db35ccf09a6..6a841d53bb1080be8f9099e6af3292882b10009f 100644 (file)
@@ -896,7 +896,7 @@ static void setup_itct_v3_hw(struct hisi_hba *hisi_hba,
                        qw0 = HISI_SAS_DEV_TYPE_SATA << ITCT_HDR_DEV_TYPE_OFF;
                break;
        default:
-               dev_warn(dev, "setup itct: unsupported dev type (%d)\n",
+               dev_warn(dev, "setup itct: unsupported dev type (%u)\n",
                         sas_dev->dev_type);
        }
 
@@ -2847,7 +2847,7 @@ static void wait_cmds_complete_timeout_v3_hw(struct hisi_hba *hisi_hba,
 static ssize_t intr_conv_v3_hw_show(struct device *dev,
                                    struct device_attribute *attr, char *buf)
 {
-       return scnprintf(buf, PAGE_SIZE, "%u\n", hisi_sas_intr_conv);
+       return scnprintf(buf, PAGE_SIZE, "%d\n", hisi_sas_intr_conv);
 }
 static DEVICE_ATTR_RO(intr_conv_v3_hw);
 
@@ -3293,7 +3293,7 @@ static int debugfs_set_bist_v3_hw(struct hisi_hba *hisi_hba, bool enable)
        u32 *fix_code = &hisi_hba->debugfs_bist_fixed_code[0];
        struct device *dev = hisi_hba->dev;
 
-       dev_info(dev, "BIST info:phy%d link_rate=%d code_mode=%d path_mode=%d ffe={0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x} fixed_code={0x%x, 0x%x}\n",
+       dev_info(dev, "BIST info:phy%u link_rate=%u code_mode=%u path_mode=%u ffe={0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x} fixed_code={0x%x, 0x%x}\n",
                 phy_no, linkrate, code_mode, path_mode,
                 ffe[FFE_SAS_1_5_GBPS], ffe[FFE_SAS_3_0_GBPS],
                 ffe[FFE_SAS_6_0_GBPS], ffe[FFE_SAS_12_0_GBPS],
@@ -3650,7 +3650,7 @@ static void debugfs_print_reg_v3_hw(u32 *regs_val, struct seq_file *s,
        int i;
 
        for (i = 0; i < reg->count; i++) {
-               int off = i * HISI_SAS_REG_MEM_SIZE;
+               u32 off = i * HISI_SAS_REG_MEM_SIZE;
                const char *name;
 
                name = debugfs_to_reg_name_v3_hw(off, reg->base_off,