Skip to content

Commit 9722973

Browse files
Yihang Ligregkh
authored andcommitted
scsi: hisi_sas: Remove redundant checks for automatic debugfs dump
commit 3f03055 upstream. In commit 63f0733 ("scsi: hisi_sas: Allocate DFX memory during dump trigger"), the memory allocation time of the DFX is changed from device initialization to dump occurs, so .debugfs_itct is not a valid address and do not need to check. The parameter hisi_sas_debugfs_enable is enough to check whether automatic debugfs dump is triggered, so remove redunant checks. Fixes: 63f0733 ("scsi: hisi_sas: Allocate DFX memory during dump trigger") Signed-off-by: Yihang Li <liyihang9@huawei.com> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Link: https://lore.kernel.org/r/1705904747-62186-3-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3de1b50 commit 9722973

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ static int hisi_sas_controller_prereset(struct hisi_hba *hisi_hba)
15791579
return -EPERM;
15801580
}
15811581

1582-
if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct[0].itct)
1582+
if (hisi_sas_debugfs_enable)
15831583
hisi_hba->hw->debugfs_snapshot_regs(hisi_hba);
15841584

15851585
return 0;
@@ -1967,7 +1967,7 @@ static bool hisi_sas_internal_abort_timeout(struct sas_task *task,
19671967
struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
19681968
struct hisi_sas_internal_abort_data *timeout = data;
19691969

1970-
if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct[0].itct) {
1970+
if (hisi_sas_debugfs_enable) {
19711971
/*
19721972
* If timeout occurs in device gone scenario, to avoid
19731973
* circular dependency like:

0 commit comments

Comments
 (0)