From: John Garry Date: Tue, 15 Aug 2023 11:51:48 +0000 (+0000) Subject: scsi: libsas: Delete enum sas_class X-Git-Tag: v6.6.7~1928^2~20^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c46a91709335ef8fccec082201e758531aee1c8f;p=platform%2Fkernel%2Flinux-starfive.git scsi: libsas: Delete enum sas_class enum sas_class prob would have been useful if function sas_show_class() was ever implemented, which it wasn't. enum sas_class is used as asd_sas_port.class and asd_sas_phy.class, which are only ever set, so delete these members and the enum. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230815115156.343535-3-john.g.garry@oracle.com Reviewed-by: Damien Le Moal Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index 3dd11014..d8f56e5 100644 --- a/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c @@ -72,7 +72,6 @@ static int asd_init_phy(struct asd_phy *phy) struct asd_sas_phy *sas_phy = &phy->sas_phy; sas_phy->enabled = 1; - sas_phy->class = SAS; sas_phy->iproto = SAS_PROTOCOL_ALL; sas_phy->tproto = 0; sas_phy->type = PHY_TYPE_PHYSICAL; diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 189d058..2e69f24 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1018,7 +1018,6 @@ static void hisi_sas_phy_init(struct hisi_hba *hisi_hba, int phy_no) phy->minimum_linkrate = SAS_LINK_RATE_1_5_GBPS; phy->maximum_linkrate = hisi_hba->hw->phy_get_max_linkrate(); sas_phy->enabled = (phy_no < hisi_hba->n_phy) ? 1 : 0; - sas_phy->class = SAS; sas_phy->iproto = SAS_PROTOCOL_ALL; sas_phy->tproto = 0; sas_phy->type = PHY_TYPE_PHYSICAL; diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c index aa87873..ea2e339 100644 --- a/drivers/scsi/isci/phy.c +++ b/drivers/scsi/isci/phy.c @@ -1404,7 +1404,6 @@ void isci_phy_init(struct isci_phy *iphy, struct isci_host *ihost, int index) iphy->sas_phy.ha = &ihost->sas_ha; iphy->sas_phy.lldd_phy = iphy; iphy->sas_phy.enabled = 1; - iphy->sas_phy.class = SAS; iphy->sas_phy.iproto = SAS_PROTOCOL_ALL; iphy->sas_phy.tproto = 0; iphy->sas_phy.type = PHY_TYPE_PHYSICAL; diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h index 6f593fa..c06ecbc 100644 --- a/drivers/scsi/libsas/sas_internal.h +++ b/drivers/scsi/libsas/sas_internal.h @@ -41,7 +41,6 @@ struct sas_phy_data { void sas_scsi_recover_host(struct Scsi_Host *shost); -int sas_show_class(enum sas_class class, char *buf); int sas_show_proto(enum sas_protocol proto, char *buf); int sas_show_linkrate(enum sas_linkrate linkrate, char *buf); int sas_show_oob_mode(enum sas_oob_mode oob_mode, char *buf); diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c index 11599c0..7893c46 100644 --- a/drivers/scsi/libsas/sas_port.c +++ b/drivers/scsi/libsas/sas_port.c @@ -83,7 +83,6 @@ static void sas_form_port_add_phy(struct asd_sas_port *port, memcpy(port->sas_addr, phy->sas_addr, SAS_ADDR_SIZE); if (*(u64 *)port->attached_sas_addr == 0) { - port->class = phy->class; memcpy(port->attached_sas_addr, phy->attached_sas_addr, SAS_ADDR_SIZE); port->iproto = phy->iproto; @@ -249,7 +248,6 @@ void sas_deform_port(struct asd_sas_phy *phy, int gone) INIT_LIST_HEAD(&port->phy_list); memset(port->sas_addr, 0, SAS_ADDR_SIZE); memset(port->attached_sas_addr, 0, SAS_ADDR_SIZE); - port->class = 0; port->iproto = 0; port->tproto = 0; port->oob_mode = 0; diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index aea70ec..408113b 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -84,7 +84,6 @@ static void mvs_phy_init(struct mvs_info *mvi, int phy_id) phy->port = NULL; timer_setup(&phy->timer, NULL, 0); sas_phy->enabled = (phy_id < mvi->chip->n_phy) ? 1 : 0; - sas_phy->class = SAS; sas_phy->iproto = SAS_PROTOCOL_ALL; sas_phy->tproto = 0; sas_phy->type = PHY_TYPE_PHYSICAL; diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 1e0154d..e5d794a 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -162,7 +162,6 @@ static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id) phy->minimum_linkrate = SAS_LINK_RATE_1_5_GBPS; phy->maximum_linkrate = SAS_LINK_RATE_6_0_GBPS; sas_phy->enabled = (phy_id < pm8001_ha->chip->n_phy) ? 1 : 0; - sas_phy->class = SAS; sas_phy->iproto = SAS_PROTOCOL_ALL; sas_phy->tproto = 0; sas_phy->type = PHY_TYPE_PHYSICAL; diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index ccaf8f6..3048660 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -23,11 +23,6 @@ struct block_device; -enum sas_class { - SAS, - EXPANDER -}; - enum sas_phy_role { PHY_ROLE_NONE = 0, PHY_ROLE_TARGET = 0x40, @@ -258,7 +253,6 @@ struct asd_sas_port { /* public: */ int id; - enum sas_class class; u8 sas_addr[SAS_ADDR_SIZE]; u8 attached_sas_addr[SAS_ADDR_SIZE]; enum sas_protocol iproto; @@ -319,7 +313,6 @@ struct asd_sas_phy { int enabled; /* must be set */ int id; /* must be set */ - enum sas_class class; enum sas_protocol iproto; enum sas_protocol tproto;