Skip to contentSkip to conversation

iser: fix a warning about container_of being redefined

PATCH Applied Roi Dayan 2 participants 2 messages Apr 10, 2014 Kbuild

lore
Share & tools
lore

Roi Dayan

author
#0 lore raw

PATCH 1/1 iser: fix a warning about container_of being redefined

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

---
 usr/iscsi/iser.c      |    4 +---
 usr/iscsi/iser.h      |    3 +++
 usr/iscsi/iser_text.c |    2 --
 3 files changed, 4 insertions(+), 5 deletions(-)
usr/iscsi/iser.c +1 -3
index 7a0d20c..d748184 100644
@@ -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>
usr/iscsi/iser.h +3 -0
index 4e4c8f2..48d0a8c 100644
@@ -25,6 +25,9 @@
 
 #include "iscsid.h"
 
+#include <infiniband/verbs.h>
+#include <rdma/rdma_cma.h>
+
 extern short control_port;
 
 /*
usr/iscsi/iser_text.c +0 -2
index 16520cb..8180dbc 100644
@@ -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"
Signature · 1 line
1.7.8.2
#1 lore raw
Quoted 11 lines · On Thu, 10 Apr 2014 18:40:51 +0300 Roi Dayan <[email protected]> wrote:

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

---
 usr/iscsi/iser.c      |    4 +---
 usr/iscsi/iser.h      |    3 +++
 usr/iscsi/iser_text.c |    2 --
 3 files changed, 4 insertions(+), 5 deletions(-)

Applied, thanks.