[PATCH] RDMA: Make most headers compile stand alone

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

 



So that rdma can work with CONFIG_KERNEL_HEADER_TEST and
CONFIG_HEADERS_CHECK.

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
---
 include/Kbuild               | 6 ------
 include/rdma/ib.h            | 2 ++
 include/rdma/iw_portmap.h    | 3 +++
 include/rdma/opa_port_info.h | 2 ++
 include/rdma/rdmavt_cq.h     | 1 +
 include/rdma/signature.h     | 2 ++
 6 files changed, 10 insertions(+), 6 deletions(-)

HFI guys: you need to fix the problems around tid_rdma_defs.h

diff --git a/include/Kbuild b/include/Kbuild
index c38f0d46b267cb..fc2aa4e2065811 100644
--- a/include/Kbuild
+++ b/include/Kbuild
@@ -945,12 +945,6 @@ header-test-			+= net/xdp.h
 header-test-			+= net/xdp_priv.h
 header-test-			+= pcmcia/cistpl.h
 header-test-			+= pcmcia/ds.h
-header-test-			+= rdma/ib.h
-header-test-			+= rdma/iw_portmap.h
-header-test-			+= rdma/opa_port_info.h
-header-test-			+= rdma/rdmavt_cq.h
-header-test-			+= rdma/restrack.h
-header-test-			+= rdma/signature.h
 header-test-			+= rdma/tid_rdma_defs.h
 header-test-			+= scsi/fc/fc_encaps.h
 header-test-			+= scsi/fc/fc_fc2.h
diff --git a/include/rdma/ib.h b/include/rdma/ib.h
index 4f385ec54f80ce..fe2fc9e91588de 100644
--- a/include/rdma/ib.h
+++ b/include/rdma/ib.h
@@ -36,6 +36,8 @@
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/cred.h>
+#include <linux/uaccess.h>
+#include <linux/fs.h>
 
 struct ib_addr {
 	union {
diff --git a/include/rdma/iw_portmap.h b/include/rdma/iw_portmap.h
index b9fee7feeeb5a5..c89535047c42cd 100644
--- a/include/rdma/iw_portmap.h
+++ b/include/rdma/iw_portmap.h
@@ -33,6 +33,9 @@
 #ifndef _IW_PORTMAP_H
 #define _IW_PORTMAP_H
 
+#include <linux/socket.h>
+#include <linux/netlink.h>
+
 #define IWPM_ULIBNAME_SIZE	32
 #define IWPM_DEVNAME_SIZE	32
 #define IWPM_IFNAME_SIZE	16
diff --git a/include/rdma/opa_port_info.h b/include/rdma/opa_port_info.h
index 7147a92630114d..bdbfe25d38548b 100644
--- a/include/rdma/opa_port_info.h
+++ b/include/rdma/opa_port_info.h
@@ -33,6 +33,8 @@
 #if !defined(OPA_PORT_INFO_H)
 #define OPA_PORT_INFO_H
 
+#include <rdma/opa_smi.h>
+
 #define OPA_PORT_LINK_MODE_NOP	0		/* No change */
 #define OPA_PORT_LINK_MODE_OPA	4		/* Port mode is OPA */
 
diff --git a/include/rdma/rdmavt_cq.h b/include/rdma/rdmavt_cq.h
index 04c519ef6d715b..574eb7278f468f 100644
--- a/include/rdma/rdmavt_cq.h
+++ b/include/rdma/rdmavt_cq.h
@@ -53,6 +53,7 @@
 
 #include <linux/kthread.h>
 #include <rdma/ib_user_verbs.h>
+#include <rdma/ib_verbs.h>
 
 /*
  * Define an ib_cq_notify value that is not valid so we know when CQ
diff --git a/include/rdma/signature.h b/include/rdma/signature.h
index f24cc2a1d3c5d9..d16b0fcc8344b3 100644
--- a/include/rdma/signature.h
+++ b/include/rdma/signature.h
@@ -6,6 +6,8 @@
 #ifndef _RDMA_SIGNATURE_H_
 #define _RDMA_SIGNATURE_H_
 
+#include <linux/types.h>
+
 enum ib_signature_prot_cap {
 	IB_PROT_T10DIF_TYPE_1 = 1,
 	IB_PROT_T10DIF_TYPE_2 = 1 << 1,
-- 
2.22.0





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux