scsi: libsas: Delete enum sas_class
authorJohn Garry <john.g.garry@oracle.com>
Tue, 15 Aug 2023 11:51:48 +0000 (11:51 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 21 Aug 2023 21:50:57 +0000 (17:50 -0400)
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 <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20230815115156.343535-3-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aic94xx/aic94xx_hwi.c
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/isci/phy.c
drivers/scsi/libsas/sas_internal.h
drivers/scsi/libsas/sas_port.c
drivers/scsi/mvsas/mv_init.c
drivers/scsi/pm8001/pm8001_init.c
include/scsi/libsas.h

index 3dd1101..d8f56e5 100644 (file)
@@ -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;
index 189d058..2e69f24 100644 (file)
@@ -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;
index aa87873..ea2e339 100644 (file)
@@ -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;
index 6f593fa..c06ecbc 100644 (file)
@@ -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);
index 11599c0..7893c46 100644 (file)
@@ -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;
index aea70ec..408113b 100644 (file)
@@ -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;
index 1e0154d..e5d794a 100644 (file)
@@ -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;
index ccaf8f6..3048660 100644 (file)
 
 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;