* [PATCH] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy()
@ 2022-01-04 12:42 chenxiang
2022-01-05 9:06 ` John Garry
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: chenxiang @ 2022-01-04 12:42 UTC (permalink / raw)
To: jejb, martin.petersen
Cc: linux-scsi, linuxarm, john.garry, nathan, colin.i.king, Xiang Chen
From: Xiang Chen <chenxiang66@hisilicon.com>
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 remove the unused
check and variable.
Fixes: 29e2bac87421 ("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>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy()
2022-01-04 12:42 [PATCH] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy() chenxiang
@ 2022-01-05 9:06 ` John Garry
2022-01-07 14:09 ` Martin K. Petersen
2022-01-10 22:04 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: John Garry @ 2022-01-05 9:06 UTC (permalink / raw)
To: chenxiang, jejb, martin.petersen
Cc: linux-scsi, linuxarm, nathan, colin.i.king
On 04/01/2022 12:42, chenxiang wrote:
> From: Xiang Chen<chenxiang66@hisilicon.com>
>
> 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 remove the unused
> check and variable.
>
> Fixes: 29e2bac87421 ("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>
> Signed-off-by: Xiang Chen<chenxiang66@hisilicon.com>
Acked-by: John Garry <john.garry@huawei.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy()
2022-01-04 12:42 [PATCH] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy() chenxiang
2022-01-05 9:06 ` John Garry
@ 2022-01-07 14:09 ` Martin K. Petersen
2022-01-10 22:04 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-01-07 14:09 UTC (permalink / raw)
To: chenxiang
Cc: jejb, martin.petersen, linux-scsi, linuxarm, john.garry, nathan,
colin.i.king
chenxiang,
> 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 remove the unused
> check and variable.
Applied to 5.17/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy()
2022-01-04 12:42 [PATCH] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy() chenxiang
2022-01-05 9:06 ` John Garry
2022-01-07 14:09 ` Martin K. Petersen
@ 2022-01-10 22:04 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-01-10 22:04 UTC (permalink / raw)
To: jejb, chenxiang
Cc: Martin K . Petersen, linux-scsi, john.garry, colin.i.king,
nathan, linuxarm
On Tue, 4 Jan 2022 20:42:06 +0800, chenxiang wrote:
> From: Xiang Chen <chenxiang66@hisilicon.com>
>
> 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 remove the unused
> check and variable.
>
> [...]
Applied to 5.17/scsi-queue, thanks!
[1/1] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy()
https://git.kernel.org/mkp/scsi/c/5d9224fb076e
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-10 22:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 12:42 [PATCH] scsi: hisi_sas: Remove unused variable and check in hisi_sas_send_ata_reset_each_phy() chenxiang
2022-01-05 9:06 ` John Garry
2022-01-07 14:09 ` Martin K. Petersen
2022-01-10 22:04 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).