Skip to contentSkip to conversation

Move the eh_deadline module parameter definition to the top of hosts.c

PATCH Applied Bart Van Assche 4 participants 4 messages Feb 12, 2018 – Feb 14, 2018 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move the eh_deadline module parameter definition to the top of hosts.c

The eh_deadline definition occurs in the middle of the code for releasing a host. Avoid splitting the host release code by moving the definition of the eh_deadline parameter to the top of the hosts.c source file.

Cc Christoph Hellwig <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Johannes Thumshirn <[email protected]>
---
 drivers/scsi/hosts.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/scsi/hosts.c +6 -6
index 57bf43e34863..a0a7e4ff255c 100644
@@ -42,6 +42,12 @@
 #include "scsi_logging.h"
 
 
+static int shost_eh_deadline = -1;
+
+module_param_named(eh_deadline, shost_eh_deadline, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(eh_deadline,
+		 "SCSI EH timeout in seconds (should be between 0 and 2^31-1)");
+
 static DEFINE_IDA(host_index_ida);
 
 
@@ -358,12 +364,6 @@ static void scsi_host_dev_release(struct device *dev)
 	kfree(shost);
 }
 
-static int shost_eh_deadline = -1;
-
-module_param_named(eh_deadline, shost_eh_deadline, int, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(eh_deadline,
-		 "SCSI EH timeout in seconds (should be between 0 and 2^31-1)");
-
 static struct device_type scsi_host_type = {
 	.name =		"scsi_host",
 	.release =	scsi_host_dev_release,
Signature · 1 line
2.16.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 34 lines · Bart Van Assche

The eh_deadline definition occurs in the middle of the code for releasing a host. Avoid splitting the host release code by moving the definition of the eh_deadline parameter to the top of the hosts.c source file.

Cc Christoph Hellwig <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Johannes Thumshirn <[email protected]>
---
 drivers/scsi/hosts.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/scsi/hosts.c +6 -0
index 57bf43e34863..a0a7e4ff255c 100644
@@ -42,6 +42,12 @@
 #include "scsi_logging.h"
 
 
+static int shost_eh_deadline = -1;
+
+module_param_named(eh_deadline, shost_eh_deadline, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(eh_deadline,
+		 "SCSI EH timeout in seconds (should be between 0 and 2^31-1)");
+
 static DEFINE_IDA(host_index_ida);
 
 
@@ -358,12 +364,6 @@ static void scsi_host_dev_release(struct device *dev)
 	kfree(shost);
 }

drivers/scsi/hosts.c static void scsi_host_dev_release(struct device *dev) · line 369

Quoted 10 lines
drivers/scsi/hosts.c +0 -6
 
-static int shost_eh_deadline = -1;
-
-module_param_named(eh_deadline, shost_eh_deadline, int, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(eh_deadline,
-		 "SCSI EH timeout in seconds (should be between 0 and 2^31-1)");
-
 static struct device_type scsi_host_type = {
 	.name =		"scsi_host",
 	.release =	scsi_host_dev_release,

Cheers,

Hannes

Reviewed-by on v1 1/1
#2 lore raw
In reply to Bart Van Assche

Thanks Bart,

Signature · 10 lines
Johannes Thumshirn                                          Storage
jthu
[email protected]                                +49 911 74053 689
SUSE
LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane
Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38
9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
#3 lore raw
In reply to Bart Van Assche

Bart,

Quoted 4 lines

The eh_deadline definition occurs in the middle of the code for releasing a host. Avoid splitting the host release code by moving the definition of the eh_deadline parameter to the top of the hosts.c source file.

Applied to 4.17/scsi-queue. Thank you!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering