public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: jejb@linux.ibm.com, martin.petersen@oracle.com,
	chenxiang66@hisilicon.com, artur.paszkiewicz@intel.com,
	yanaijie@huawei.com, jinpu.wang@cloud.ionos.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	dlemoal@kernel.org, John Garry <john.g.garry@oracle.com>
Subject: [PATCH 02/10] scsi: libsas: Delete enum sas_class
Date: Mon, 14 Aug 2023 14:10:14 +0000	[thread overview]
Message-ID: <20230814141022.36875-3-john.g.garry@oracle.com> (raw)
In-Reply-To: <20230814141022.36875-1-john.g.garry@oracle.com>

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>
---
 drivers/scsi/aic94xx/aic94xx_hwi.c    | 1 -
 drivers/scsi/hisi_sas/hisi_sas_main.c | 1 -
 drivers/scsi/isci/phy.c               | 1 -
 drivers/scsi/libsas/sas_internal.h    | 1 -
 drivers/scsi/libsas/sas_port.c        | 2 --
 drivers/scsi/mvsas/mv_init.c          | 1 -
 drivers/scsi/pm8001/pm8001_init.c     | 1 -
 include/scsi/libsas.h                 | 7 -------
 8 files changed, 15 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c
index 3dd110143471..d8f56e528877 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 9585f1ed8ae5..1172065c1d7d 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 aa8787343e83..ea2e339f5b1a 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 6f593fa69b58..c06ecbcf1254 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 11599c0e3fc3..7893c462169a 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 aea70ec308f9..408113bf506d 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 1e0154d08393..e5d794a97b14 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 ccaf8f6b1055..3048660ff107 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;
 
-- 
2.35.3


  parent reply	other threads:[~2023-08-14 14:12 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 14:10 [PATCH 00/10] libsas: Some tidy-up John Garry
2023-08-14 14:10 ` [PATCH 01/10] scsi: libsas: Delete sas_ha_struct.lldd_module John Garry
2023-08-15  2:07   ` Damien Le Moal
2023-08-15  9:27   ` Jason Yan
2023-10-09  6:38   ` Hannes Reinecke
2023-08-14 14:10 ` John Garry [this message]
2023-08-15  2:07   ` [PATCH 02/10] scsi: libsas: Delete enum sas_class Damien Le Moal
2023-08-15  9:30   ` Jason Yan
2023-10-09  6:38   ` Hannes Reinecke
2023-08-14 14:10 ` [PATCH 03/10] scsi: libsas: Delete enum sas_phy_type John Garry
2023-08-15  2:08   ` Damien Le Moal
2023-08-15  9:30   ` Jason Yan
2023-10-09  6:39   ` Hannes Reinecke
2023-08-14 14:10 ` [PATCH 04/10] scsi: libsas: Delete struct scsi_core John Garry
2023-08-15  2:10   ` Damien Le Moal
2023-08-15  9:30   ` Jason Yan
2023-10-09  6:40   ` Hannes Reinecke
2023-08-14 14:10 ` [PATCH 05/10] scsi: libsas: Delete sas_ssp_task.retry_count John Garry
2023-08-15  2:10   ` Damien Le Moal
2023-08-15  9:31   ` Jason Yan
2023-10-09  6:41   ` Hannes Reinecke
2023-08-14 14:10 ` [PATCH 06/10] scsi: libsas: Delete sas_ssp_task.enable_first_burst John Garry
2023-08-15  2:11   ` Damien Le Moal
2023-08-15  9:34   ` Jason Yan
2023-10-09  6:42   ` Hannes Reinecke
2023-08-14 14:10 ` [PATCH 07/10] scsi: libsas: Delete sas_ssp_task.task_prio John Garry
2023-08-15  2:17   ` Damien Le Moal
2023-08-15  7:44     ` John Garry
2023-10-09  6:55   ` Hannes Reinecke
2023-10-24 10:07     ` John Garry
2023-10-24 10:08       ` Hannes Reinecke
2023-08-14 14:10 ` [PATCH 08/10] scsi: libsas: Delete sas_ata_task.set_affil_pol John Garry
2023-08-15  2:12   ` Damien Le Moal
2023-08-15  9:37   ` Jason Yan
2023-10-09  6:56   ` Hannes Reinecke
2023-08-14 14:10 ` [PATCH 09/10] scsi: libsas: Delete sas_ata_task.stp_affil_pol John Garry
2023-08-15  2:13   ` Damien Le Moal
2023-08-15  9:37   ` Jason Yan
2023-10-09  6:57   ` Hannes Reinecke
2023-08-14 14:10 ` [PATCH 10/10] scsi: libsas: Delete sas_ata_task.retry_count John Garry
2023-08-15  2:14   ` Damien Le Moal
2023-08-15  9:37   ` Jason Yan
2023-10-09  6:57   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230814141022.36875-3-john.g.garry@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=artur.paszkiewicz@intel.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=dlemoal@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yanaijie@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox