Skip to content

Commit 5d9224f

Browse files
Xiang Chenmartinkpetersen
authored andcommitted
scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy()
In commit 29e2bac ("scsi: hisi_sas: Fix some issues related to asd_sas_port->phy_list"), we use asd_sas_port->phy_mask instead of accessing asd_sas_port->phy_list, and it is enough to use asd_sas_port->phy_mask to check the state of phy, so remove the unused check and variable. Link: https://lore.kernel.org/r/1641300126-53574-1-git-send-email-chenxiang66@hisilicon.com Fixes: 29e2bac ("scsi: hisi_sas: Fix some issues related to asd_sas_port->phy_list") Reported-by: Nathan Chancellor <nathan@kernel.org> Reported-by: Colin King <colin.i.king@gmail.com> Acked-by: John Garry <john.garry@huawei.com> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent c3b4844 commit 5d9224f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,16 +1525,11 @@ static void hisi_sas_send_ata_reset_each_phy(struct hisi_hba *hisi_hba,
15251525
struct device *dev = hisi_hba->dev;
15261526
int s = sizeof(struct host_to_dev_fis);
15271527
int rc = TMF_RESP_FUNC_FAILED;
1528-
struct asd_sas_phy *sas_phy;
15291528
struct ata_link *link;
15301529
u8 fis[20] = {0};
1531-
u32 state;
15321530
int i;
15331531

1534-
state = hisi_hba->hw->get_phys_state(hisi_hba);
15351532
for (i = 0; i < hisi_hba->n_phy; i++) {
1536-
if (!(state & BIT(sas_phy->id)))
1537-
continue;
15381533
if (!(sas_port->phy_mask & BIT(i)))
15391534
continue;
15401535

0 commit comments

Comments
 (0)