Skip to content

Commit c46a917

Browse files
johnpgarrymartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent b1bc497 commit c46a917

File tree

8 files changed

+0
-15
lines changed

8 files changed

+0
-15
lines changed

drivers/scsi/aic94xx/aic94xx_hwi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ static int asd_init_phy(struct asd_phy *phy)
7272
struct asd_sas_phy *sas_phy = &phy->sas_phy;
7373

7474
sas_phy->enabled = 1;
75-
sas_phy->class = SAS;
7675
sas_phy->iproto = SAS_PROTOCOL_ALL;
7776
sas_phy->tproto = 0;
7877
sas_phy->type = PHY_TYPE_PHYSICAL;

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,6 @@ static void hisi_sas_phy_init(struct hisi_hba *hisi_hba, int phy_no)
10181018
phy->minimum_linkrate = SAS_LINK_RATE_1_5_GBPS;
10191019
phy->maximum_linkrate = hisi_hba->hw->phy_get_max_linkrate();
10201020
sas_phy->enabled = (phy_no < hisi_hba->n_phy) ? 1 : 0;
1021-
sas_phy->class = SAS;
10221021
sas_phy->iproto = SAS_PROTOCOL_ALL;
10231022
sas_phy->tproto = 0;
10241023
sas_phy->type = PHY_TYPE_PHYSICAL;

drivers/scsi/isci/phy.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,6 @@ void isci_phy_init(struct isci_phy *iphy, struct isci_host *ihost, int index)
14041404
iphy->sas_phy.ha = &ihost->sas_ha;
14051405
iphy->sas_phy.lldd_phy = iphy;
14061406
iphy->sas_phy.enabled = 1;
1407-
iphy->sas_phy.class = SAS;
14081407
iphy->sas_phy.iproto = SAS_PROTOCOL_ALL;
14091408
iphy->sas_phy.tproto = 0;
14101409
iphy->sas_phy.type = PHY_TYPE_PHYSICAL;

drivers/scsi/libsas/sas_internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ struct sas_phy_data {
4141

4242
void sas_scsi_recover_host(struct Scsi_Host *shost);
4343

44-
int sas_show_class(enum sas_class class, char *buf);
4544
int sas_show_proto(enum sas_protocol proto, char *buf);
4645
int sas_show_linkrate(enum sas_linkrate linkrate, char *buf);
4746
int sas_show_oob_mode(enum sas_oob_mode oob_mode, char *buf);

drivers/scsi/libsas/sas_port.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ static void sas_form_port_add_phy(struct asd_sas_port *port,
8383
memcpy(port->sas_addr, phy->sas_addr, SAS_ADDR_SIZE);
8484

8585
if (*(u64 *)port->attached_sas_addr == 0) {
86-
port->class = phy->class;
8786
memcpy(port->attached_sas_addr, phy->attached_sas_addr,
8887
SAS_ADDR_SIZE);
8988
port->iproto = phy->iproto;
@@ -249,7 +248,6 @@ void sas_deform_port(struct asd_sas_phy *phy, int gone)
249248
INIT_LIST_HEAD(&port->phy_list);
250249
memset(port->sas_addr, 0, SAS_ADDR_SIZE);
251250
memset(port->attached_sas_addr, 0, SAS_ADDR_SIZE);
252-
port->class = 0;
253251
port->iproto = 0;
254252
port->tproto = 0;
255253
port->oob_mode = 0;

drivers/scsi/mvsas/mv_init.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ static void mvs_phy_init(struct mvs_info *mvi, int phy_id)
8484
phy->port = NULL;
8585
timer_setup(&phy->timer, NULL, 0);
8686
sas_phy->enabled = (phy_id < mvi->chip->n_phy) ? 1 : 0;
87-
sas_phy->class = SAS;
8887
sas_phy->iproto = SAS_PROTOCOL_ALL;
8988
sas_phy->tproto = 0;
9089
sas_phy->type = PHY_TYPE_PHYSICAL;

drivers/scsi/pm8001/pm8001_init.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id)
162162
phy->minimum_linkrate = SAS_LINK_RATE_1_5_GBPS;
163163
phy->maximum_linkrate = SAS_LINK_RATE_6_0_GBPS;
164164
sas_phy->enabled = (phy_id < pm8001_ha->chip->n_phy) ? 1 : 0;
165-
sas_phy->class = SAS;
166165
sas_phy->iproto = SAS_PROTOCOL_ALL;
167166
sas_phy->tproto = 0;
168167
sas_phy->type = PHY_TYPE_PHYSICAL;

include/scsi/libsas.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323

2424
struct block_device;
2525

26-
enum sas_class {
27-
SAS,
28-
EXPANDER
29-
};
30-
3126
enum sas_phy_role {
3227
PHY_ROLE_NONE = 0,
3328
PHY_ROLE_TARGET = 0x40,
@@ -258,7 +253,6 @@ struct asd_sas_port {
258253
/* public: */
259254
int id;
260255

261-
enum sas_class class;
262256
u8 sas_addr[SAS_ADDR_SIZE];
263257
u8 attached_sas_addr[SAS_ADDR_SIZE];
264258
enum sas_protocol iproto;
@@ -319,7 +313,6 @@ struct asd_sas_phy {
319313
int enabled; /* must be set */
320314

321315
int id; /* must be set */
322-
enum sas_class class;
323316
enum sas_protocol iproto;
324317
enum sas_protocol tproto;
325318

0 commit comments

Comments
 (0)