]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: hisi_sas: Fix sparse warnings in prep_ata_v3_hw()
authorYihang Li <liyihang9@huawei.com>
Mon, 20 Apr 2026 02:10:44 +0000 (10:10 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 21 Apr 2026 02:37:15 +0000 (22:37 -0400)
In prep_ata_v3_hw(), add cpu_to_le32() to fix warning:

  drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1448:26: sparse: sparse: invalid assignment: |=
  drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1448:26: sparse:    left side has type restricted __le32
  drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1448:26: sparse:    right side has type unsigned int

Fixes: 8aa580cd9284 ("scsi: hisi_sas: Enable force phy when SATA disk directly connected")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604191850.IVYPTaML-lkp@intel.com/
Signed-off-by: Yihang Li <liyihang9@huawei.com>
Link: https://patch.msgid.link/20260420021044.3339459-1-liyihang9@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

index fda07b193137af1201342b339bcc1fc5d09a0408..14d563e82d208514cd127be7fd61ddeebf525e6e 100644 (file)
@@ -1491,7 +1491,7 @@ static void prep_ata_v3_hw(struct hisi_hba *hisi_hba,
                phy_id = device->phy->identify.phy_identifier;
                hdr->dw0 |= cpu_to_le32((1U << phy_id)
                                << CMD_HDR_PHY_ID_OFF);
-               hdr->dw0 |= CMD_HDR_FORCE_PHY_MSK;
+               hdr->dw0 |= cpu_to_le32(CMD_HDR_FORCE_PHY_MSK);
                hdr->dw0 |= cpu_to_le32(4U << CMD_HDR_CMD_OFF);
        }