[PATCH] iser: fix a warning about container_of being redefined

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

 



container_of is being defined in list.h and verbs.h differently.
To keep tgtd toe use the container_of from list.h as today, Instead of
wrapping ifndef which exists in verbs.h I moved the inclusion of verbs
to after list.h

Signed-off-by: Roi Dayan <roid@xxxxxxxxxxxx>
---
 usr/iscsi/iser.c      |    4 +---
 usr/iscsi/iser.h      |    3 +++
 usr/iscsi/iser_text.c |    2 --
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/usr/iscsi/iser.c b/usr/iscsi/iser.c
index 7a0d20c..d748184 100644
--- a/usr/iscsi/iser.c
+++ b/usr/iscsi/iser.c
@@ -30,18 +30,16 @@
 #include <assert.h>
 #include <netdb.h>
 #include <sys/epoll.h>
-#include <infiniband/verbs.h>
-#include <rdma/rdma_cma.h>
 #include <sys/ipc.h>
 #include <sys/shm.h>
 
 #include "util.h"
 #include "iscsid.h"
 #include "target.h"
-#include "iser.h"
 #include "driver.h"
 #include "scsi.h"
 #include "work.h"
+#include "iser.h"
 
 #if defined(HAVE_VALGRIND) && !defined(NDEBUG)
 #include <valgrind/memcheck.h>
diff --git a/usr/iscsi/iser.h b/usr/iscsi/iser.h
index 4e4c8f2..48d0a8c 100644
--- a/usr/iscsi/iser.h
+++ b/usr/iscsi/iser.h
@@ -25,6 +25,9 @@
 
 #include "iscsid.h"
 
+#include <infiniband/verbs.h>
+#include <rdma/rdma_cma.h>
+
 extern short control_port;
 
 /*
diff --git a/usr/iscsi/iser_text.c b/usr/iscsi/iser_text.c
index 16520cb..8180dbc 100644
--- a/usr/iscsi/iser_text.c
+++ b/usr/iscsi/iser_text.c
@@ -31,8 +31,6 @@
 #include <assert.h>
 #include <netdb.h>
 #include <sys/epoll.h>
-#include <infiniband/verbs.h>
-#include <rdma/rdma_cma.h>
 
 #include "util.h"
 #include "iscsid.h"
-- 
1.7.8.2

--
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