Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727286

[PATCH v4 02/11] libsas: remove the numbering for each event enum

From Jason Yan <yanaijie@huawei.com>
Newsgroups linux.kernel
Subject [PATCH v4 02/11] libsas: remove the numbering for each event enum
Date 2017-09-06 11:20 +0200
Message-ID <umEF5-81v-45@gated-at.bofh.it> (permalink)
References <umEF3-81v-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Numbering for each event enum makes no sense. Remove the numbering so
that we don't have to calculate the number by hand every time.

Signed-off-by: Jason Yan <yanaijie@huawei.com>
CC: John Garry <john.garry@huawei.com>
CC: Johannes Thumshirn <jthumshirn@suse.de>
CC: Ewan Milne <emilne@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
CC: Tomas Henzl <thenzl@redhat.com>
---
 include/scsi/libsas.h | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index e536597..ccf3b48 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -62,31 +62,31 @@ enum sas_phy_type {
  */
 enum port_event {
 	PORTE_BYTES_DMAED     = 0U,
-	PORTE_BROADCAST_RCVD  = 1,
-	PORTE_LINK_RESET_ERR  = 2,
-	PORTE_TIMER_EVENT     = 3,
-	PORTE_HARD_RESET      = 4,
-	PORT_NUM_EVENTS       = 5,
+	PORTE_BROADCAST_RCVD,
+	PORTE_LINK_RESET_ERR,
+	PORTE_TIMER_EVENT,
+	PORTE_HARD_RESET,
+	PORT_NUM_EVENTS,
 };
 
 enum phy_event {
 	PHYE_LOSS_OF_SIGNAL   = 0U,
-	PHYE_OOB_DONE         = 1,
-	PHYE_OOB_ERROR        = 2,
-	PHYE_SPINUP_HOLD      = 3, /* hot plug SATA, no COMWAKE sent */
-	PHYE_RESUME_TIMEOUT   = 4,
-	PHY_NUM_EVENTS        = 5,
+	PHYE_OOB_DONE,
+	PHYE_OOB_ERROR,
+	PHYE_SPINUP_HOLD,             /* hot plug SATA, no COMWAKE sent */
+	PHYE_RESUME_TIMEOUT,
+	PHY_NUM_EVENTS,
 };
 
 enum discover_event {
 	DISCE_DISCOVER_DOMAIN   = 0U,
-	DISCE_REVALIDATE_DOMAIN = 1,
-	DISCE_PORT_GONE         = 2,
-	DISCE_PROBE		= 3,
-	DISCE_SUSPEND		= 4,
-	DISCE_RESUME		= 5,
-	DISCE_DESTRUCT		= 6,
-	DISC_NUM_EVENTS		= 7,
+	DISCE_REVALIDATE_DOMAIN,
+	DISCE_PORT_GONE,
+	DISCE_PROBE,
+	DISCE_SUSPEND,
+	DISCE_RESUME,
+	DISCE_DESTRUCT,
+	DISC_NUM_EVENTS,
 };
 
 /* ---------- Expander Devices ---------- */
-- 
2.5.0

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 00/11] Enhance libsas hotplug feature Jason Yan <yanaijie@huawei.com> - 2017-09-06 11:20 +0200
  [PATCH v4 06/11] libsas: shut down the PHY if events reached the threshold Jason Yan <yanaijie@huawei.com> - 2017-09-06 11:20 +0200
  [PATCH v4 02/11] libsas: remove the numbering for each event enum Jason Yan <yanaijie@huawei.com> - 2017-09-06 11:20 +0200
    Re: [PATCH v4 02/11] libsas: remove the numbering for each event enum Johannes Thumshirn <jthumshirn@suse.de> - 2017-09-06 14:50 +0200
    Re: [PATCH v4 02/11] libsas: remove the numbering for each event         enum Christoph Hellwig <hch@lst.de> - 2017-09-06 15:30 +0200
  Re: [PATCH v4 00/11] Enhance libsas hotplug feature Christoph Hellwig <hch@lst.de> - 2017-09-06 15:30 +0200
    Re: [PATCH v4 00/11] Enhance libsas hotplug feature Jason Yan <yanaijie@huawei.com> - 2017-09-07 03:20 +0200
  Re: [PATCH v4 00/11] Enhance libsas hotplug feature John Garry <john.garry@huawei.com> - 2017-09-06 15:30 +0200

csiph-web