[PATCH] kill unused in_kernel field in struct tgt_driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 usr/driver.h       |    1 -
 usr/fcoe/fcoe_if.c |    1 -
 usr/iscsi/iscsid.c |    1 -
 usr/iscsi/iser.c   |    1 -
 usr/tgtd.c         |   17 ++---------------
 usr/tgtd.h         |    9 ---------
 6 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/usr/driver.h b/usr/driver.h
index 173471c..1ca3f9d 100644
--- a/usr/driver.h
+++ b/usr/driver.h
@@ -3,7 +3,6 @@
 
 struct tgt_driver {
 	const char *name;
-	int use_kernel;
 
 	int (*init)(int, char *);
 	void (*exit)(void);
diff --git a/usr/fcoe/fcoe_if.c b/usr/fcoe/fcoe_if.c
index 28d8140..779f753 100644
--- a/usr/fcoe/fcoe_if.c
+++ b/usr/fcoe/fcoe_if.c
@@ -217,7 +217,6 @@ static int fcoe_init(int index, char *args)
 
 static struct tgt_driver fcoe = {
 	.name			= "fcoe",
-	.use_kernel		= 0,
 	.target_create		= fcoe_target_create,
 	.target_destroy		= fcoe_target_destroy,
 	.init			= fcoe_init,
diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 22a21cc..b1b6e65 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -2449,7 +2449,6 @@ static int iscsi_portal_destroy(char *p)
 
 static struct tgt_driver iscsi = {
 	.name			= "iscsi",
-	.use_kernel		= 0,
 	.init			= iscsi_init,
 	.exit			= iscsi_exit,
 	.target_create		= iscsi_target_create,
diff --git a/usr/iscsi/iser.c b/usr/iscsi/iser.c
index d0e46e3..a582bdf 100644
--- a/usr/iscsi/iser.c
+++ b/usr/iscsi/iser.c
@@ -3435,7 +3435,6 @@ static struct iscsi_transport iscsi_iser = {
 
 static struct tgt_driver iser = {
 	.name   		= "iser",
-	.use_kernel     	= 0,
 	.init   		= iser_init,
 	.exit   		= iser_exit,
 	.target_create  	= iser_target_create,
diff --git a/usr/tgtd.c b/usr/tgtd.c
index fd52ed5..5e07267 100644
--- a/usr/tgtd.c
+++ b/usr/tgtd.c
@@ -405,7 +405,7 @@ retry:
 		goto retry;
 }
 
-static int lld_init(int *use_kernel, char *args)
+static int lld_init(char *args)
 {
 	int i, err, nr;
 
@@ -415,12 +415,8 @@ static int lld_init(int *use_kernel, char *args)
 			if (err)
 				continue;
 		}
-
-		if (tgt_drivers[i]->use_kernel)
-			(*use_kernel)++;
 		nr++;
 	}
-
 	return nr;
 }
 
@@ -478,7 +474,6 @@ int main(int argc, char **argv)
 	struct sigaction sa_new;
 	int err, ch, longindex, nr_lld = 0;
 	int is_daemon = 1, is_debug = 0;
-	int use_kernel = 0;
 	int ret;
 
 	/* do not allow ctrl-c for now... */
@@ -532,7 +527,7 @@ int main(int argc, char **argv)
 		exit(1);
 	}
 
-	nr_lld = lld_init(&use_kernel, argv[optind]);
+	nr_lld = lld_init(argv[optind]);
 	if (!nr_lld) {
 		fprintf(stderr, "No available low level driver!\n");
 		exit(1);
@@ -557,14 +552,6 @@ int main(int argc, char **argv)
 	if (err)
 		exit(1);
 
-	if (use_kernel) {
-		err = kreq_init();
-		if (err) {
-			eprintf("No kernel interface\n");
-			exit(1);
-		}
-	}
-
 	err = work_timer_start();
 	if (err)
 		exit(1);
diff --git a/usr/tgtd.h b/usr/tgtd.h
index 4871c73..53cc6dd 100644
--- a/usr/tgtd.h
+++ b/usr/tgtd.h
@@ -208,15 +208,6 @@ enum mgmt_req_result {
 	MGMT_REQ_QUEUED,
 };
 
-#ifdef USE_KERNEL
-extern int kreq_init(void);
-#else
-static inline int kreq_init(void)	\
-{					\
-	return 0;			\
-}
-#endif
-
 extern int system_active;
 extern int is_debug;
 
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux