Commit 1136a022 authored by John Garry's avatar John Garry Committed by Martin K. Petersen
Browse files

scsi: libsas: Delete struct scsi_core



Since commit 79855d17 ("libsas: remove task_collector mode"), struct
scsi_core only contains a reference to the shost. struct scsi_core is only
used in sas_ha_struct.core, so delete scsi_core and replace with a
reference to the shost there.

Signed-off-by: default avatarJohn Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20230815115156.343535-5-john.g.garry@oracle.com


Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 2f4e20cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ static int asd_get_user_sas_addr(struct asd_ha_struct *asd_ha)
	if (asd_ha->hw_prof.sas_addr[0])
		return 0;

	return sas_request_addr(asd_ha->sas_ha.core.shost,
	return sas_request_addr(asd_ha->sas_ha.shost,
				asd_ha->hw_prof.sas_addr);
}

+3 −3
Original line number Diff line number Diff line
@@ -687,8 +687,8 @@ static int asd_unregister_sas_ha(struct asd_ha_struct *asd_ha)

	err = sas_unregister_ha(&asd_ha->sas_ha);

	sas_remove_host(asd_ha->sas_ha.core.shost);
	scsi_host_put(asd_ha->sas_ha.core.shost);
	sas_remove_host(asd_ha->sas_ha.shost);
	scsi_host_put(asd_ha->sas_ha.shost);

	kfree(asd_ha->sas_ha.sas_phy);
	kfree(asd_ha->sas_ha.sas_port);
@@ -738,7 +738,7 @@ static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
	asd_printk("found %s, device %s\n", asd_ha->name, pci_name(dev));

	SHOST_TO_SAS_HA(shost) = &asd_ha->sas_ha;
	asd_ha->sas_ha.core.shost = shost;
	asd_ha->sas_ha.shost = shost;
	shost->transportt = aic94xx_transport_template;
	shost->max_id = ~0;
	shost->max_lun = ~0;
+3 −3
Original line number Diff line number Diff line
@@ -2519,7 +2519,7 @@ int hisi_sas_probe(struct platform_device *pdev,
	sha->dev = hisi_hba->dev;
	sha->sas_addr = &hisi_hba->sas_addr[0];
	sha->num_phys = hisi_hba->n_phy;
	sha->core.shost = hisi_hba->shost;
	sha->shost = hisi_hba->shost;

	for (i = 0; i < hisi_hba->n_phy; i++) {
		sha->sas_phy[i] = &hisi_hba->phy[i].sas_phy;
@@ -2561,12 +2561,12 @@ void hisi_sas_remove(struct platform_device *pdev)
{
	struct sas_ha_struct *sha = platform_get_drvdata(pdev);
	struct hisi_hba *hisi_hba = sha->lldd_ha;
	struct Scsi_Host *shost = sha->core.shost;
	struct Scsi_Host *shost = sha->shost;

	del_timer_sync(&hisi_hba->timer);

	sas_unregister_ha(sha);
	sas_remove_host(sha->core.shost);
	sas_remove_host(shost);

	hisi_sas_free(hisi_hba);
	scsi_host_put(shost);
+3 −3
Original line number Diff line number Diff line
@@ -4950,7 +4950,7 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)

	sha->sas_phy = arr_phy;
	sha->sas_port = arr_port;
	sha->core.shost = shost;
	sha->shost = shost;
	sha->lldd_ha = hisi_hba;

	shost->transportt = hisi_sas_stt;
@@ -5054,14 +5054,14 @@ static void hisi_sas_v3_remove(struct pci_dev *pdev)
	struct device *dev = &pdev->dev;
	struct sas_ha_struct *sha = dev_get_drvdata(dev);
	struct hisi_hba *hisi_hba = sha->lldd_ha;
	struct Scsi_Host *shost = sha->core.shost;
	struct Scsi_Host *shost = sha->shost;

	pm_runtime_get_noresume(dev);
	del_timer_sync(&hisi_hba->timer);

	sas_unregister_ha(sha);
	flush_workqueue(hisi_hba->wq);
	sas_remove_host(sha->core.shost);
	sas_remove_host(shost);

	hisi_sas_v3_destroy_irqs(pdev, hisi_hba);
	hisi_sas_free(hisi_hba);
+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ static inline struct isci_pci_info *to_pci_info(struct pci_dev *pdev)

static inline struct Scsi_Host *to_shost(struct isci_host *ihost)
{
	return ihost->sas_ha.core.shost;
	return ihost->sas_ha.shost;
}

#define for_each_isci_host(id, ihost, pdev) \
Loading