Re: [PATCH v2 05/15] scsi: hisi_sas: Fix some issues related to asd_sas_port->phy_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




@Martin and @John Garry, could you have a review and consider to merge
following patch ?

This series has not made it to Martin's 5.17 queue, but I suggest that you send it as a patch in case it does.


From: Xiang Chen <chenxiang66@xxxxxxxxxxxxx>
Date: Tue, 28 Dec 2021 09:40:01 +0800
Subject: [PATCH] scsi: libsas: Remove unused variable and check in function
   hisi_sas_send_ata_reset_each_phy()

please try to condense these subjects, like just "Remove broken legacy code in hisi_sas_send_ata_reset_each_phy()"

Or at least remove "function", as this is obvious


In commit 29e2bac87421 ("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 removing the

/s/removing/remove/

old and unused check.

Fixes: 29e2bac87421 ("scsi: hisi_sas: Fix some issues related to
asd_sas_port->phy_list")
Reported-by: Nathan Chancellor <nathan@xxxxxxxxxx>

Colin King also reported this, so please add him.

Signed-off-by: Xiang Chen <chenxiang66@xxxxxxxxxxxxx>
---
   drivers/scsi/hisi_sas/hisi_sas_main.c | 5 -----
   1 file changed, 5 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c
b/drivers/scsi/hisi_sas/hisi_sas_main.c
index f46f679fe825..a05ec7aece5a 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1525,16 +1525,11 @@ static void
hisi_sas_send_ata_reset_each_phy(struct hisi_hba *hisi_hba,
          struct device *dev = hisi_hba->dev;
          int s = sizeof(struct host_to_dev_fis);
          int rc = TMF_RESP_FUNC_FAILED;
-       struct asd_sas_phy *sas_phy;
          struct ata_link *link;
          u8 fis[20] = {0};
-       u32 state;
          int i;

-       state = hisi_hba->hw->get_phys_state(hisi_hba);
          for (i = 0; i < hisi_hba->n_phy; i++) {
-               if (!(state & BIT(sas_phy->id)))
-                       continue;
                  if (!(sas_port->phy_mask & BIT(i)))
                          continue;

--
2.33.0







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux