提交 f706463c 编写于 作者: J John Garry 提交者: Zheng Zengkai

scsi: hisi_sas: Reduce some indirection in v3 hw driver

mainline inclusion
from mainline-master
commit bec99e52
category: bugfix
bugzilla: 175270
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bec99e5250bfe1c575e72a971bc2b2b21cf6c8b4

------------------------------------------------------------------------

Sometimes local functions are called indirectly from the hw driver, which
only makes the code harder to follow. Remove these.

Method .hw_init is only called from platform driver probe, which is not
relevant, so don't set this either.

Link: https://lore.kernel.org/r/1606207594-196362-2-git-send-email-john.garry@huawei.comSigned-off-by: NJohn Garry <john.garry@huawei.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: NOuyangdelong <ouyangdelong@huawei.com>
Signed-off-by: NNifujia <nifujia1@hisilicon.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 f59ace26
......@@ -3139,7 +3139,6 @@ static struct scsi_host_template sht_v3_hw = {
};
static const struct hisi_sas_hw hisi_sas_v3_hw = {
.hw_init = hisi_sas_v3_init,
.setup_itct = setup_itct_v3_hw,
.get_wideport_bitmap = get_wideport_bitmap_v3_hw,
.complete_hdr_size = sizeof(struct hisi_sas_complete_v3_hdr),
......@@ -3319,7 +3318,7 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (rc)
goto err_out_register_ha;
rc = hisi_hba->hw->hw_init(hisi_hba);
rc = hisi_sas_v3_init(hisi_hba);
if (rc)
goto err_out_register_ha;
......@@ -3496,7 +3495,7 @@ static int _resume_v3_hw(struct device *device)
scsi_remove_host(shost);
return rc;
}
hisi_hba->hw->phys_init(hisi_hba);
phys_init_v3_hw(hisi_hba);
sas_resume_ha(sha);
clear_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册