diff mbox series

[08/23] zfcp: group sort internal structure definitions for proximity

Message ID 20181108144458.29012-9-maier@linux.ibm.com (mailing list archive)
State Accepted
Headers show
Series zfcp updates for v4.21 | expand

Commit Message

Steffen Maier Nov. 8, 2018, 2:44 p.m. UTC
Have structures just before the structures that use them
(without disrupting sequences of using structures such as
 zfcp_unit and zfcp_scsi_dev):
- zfcp_adapter_mempool embedded in zfcp_adapter,
- zfcp_latenc... embedded in zfcp_scsi_dev.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
---
 drivers/s390/scsi/zfcp_def.h | 58 ++++++++++++++++++++++----------------------
 1 file changed, 29 insertions(+), 29 deletions(-)

Comments

Hannes Reinecke Nov. 16, 2018, 11:09 a.m. UTC | #1
On 11/8/18 3:44 PM, Steffen Maier wrote:
> Have structures just before the structures that use them
> (without disrupting sequences of using structures such as
>   zfcp_unit and zfcp_scsi_dev):
> - zfcp_adapter_mempool embedded in zfcp_adapter,
> - zfcp_latenc... embedded in zfcp_scsi_dev.
> 
> Signed-off-by: Steffen Maier <maier@linux.ibm.com>
> Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
> ---
>   drivers/s390/scsi/zfcp_def.h | 58 ++++++++++++++++++++++----------------------
>   1 file changed, 29 insertions(+), 29 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index e227b0770221..31b3e2bb3b42 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -91,18 +91,6 @@ 
 
 struct zfcp_fsf_req;
 
-/* holds various memory pools of an adapter */
-struct zfcp_adapter_mempool {
-	mempool_t *erp_req;
-	mempool_t *gid_pn_req;
-	mempool_t *scsi_req;
-	mempool_t *scsi_abort;
-	mempool_t *status_read_req;
-	mempool_t *sr_data;
-	mempool_t *gid_pn;
-	mempool_t *qtcb_pool;
-};
-
 struct zfcp_erp_action {
 	struct list_head list;
 	int action;	              /* requested action code */
@@ -115,23 +103,16 @@  struct zfcp_erp_action {
 	struct timer_list timer;
 };
 
-struct zfcp_latency_record {
-	u32 min;
-	u32 max;
-	u64 sum;
-};
-
-struct zfcp_latency_cont {
-	struct zfcp_latency_record channel;
-	struct zfcp_latency_record fabric;
-	u64 counter;
-};
-
-struct zfcp_latencies {
-	struct zfcp_latency_cont read;
-	struct zfcp_latency_cont write;
-	struct zfcp_latency_cont cmd;
-	spinlock_t lock;
+/* holds various memory pools of an adapter */
+struct zfcp_adapter_mempool {
+	mempool_t *erp_req;
+	mempool_t *gid_pn_req;
+	mempool_t *scsi_req;
+	mempool_t *scsi_abort;
+	mempool_t *status_read_req;
+	mempool_t *sr_data;
+	mempool_t *gid_pn;
+	mempool_t *qtcb_pool;
 };
 
 struct zfcp_adapter {
@@ -212,6 +193,25 @@  struct zfcp_port {
 	unsigned int		starget_id;
 };
 
+struct zfcp_latency_record {
+	u32 min;
+	u32 max;
+	u64 sum;
+};
+
+struct zfcp_latency_cont {
+	struct zfcp_latency_record channel;
+	struct zfcp_latency_record fabric;
+	u64 counter;
+};
+
+struct zfcp_latencies {
+	struct zfcp_latency_cont read;
+	struct zfcp_latency_cont write;
+	struct zfcp_latency_cont cmd;
+	spinlock_t lock;
+};
+
 /**
  * struct zfcp_unit - LUN configured via zfcp sysfs
  * @dev: struct device for sysfs representation and reference counting