[openib-general] [PATCH] remove unnecessary include from mad.h
Michael S. Tsirkin
mst at mellanox.co.il
Wed Sep 14 06:44:33 PDT 2005
mad.h pulls in common.h which it does not actually depend on.
The user should include it if he wants to.
This approach reduces global namespace pollution.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: management/libibmad/include/infiniband/mad.h
===================================================================
--- management/libibmad/include/infiniband/mad.h (revision 3423)
+++ management/libibmad/include/infiniband/mad.h (working copy)
@@ -36,7 +36,6 @@
#include <stdint.h>
#include <string.h>
-#include <infiniband/common.h>
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
Index: management/libibmad/src/resolve.c
===================================================================
--- management/libibmad/src/resolve.c (revision 3423)
+++ management/libibmad/src/resolve.c (working copy)
@@ -45,6 +45,7 @@
#include <umad.h>
#include <mad.h>
+#include <infiniband/common.h>
#undef DEBUG
Index: management/libibmad/src/smp.c
===================================================================
--- management/libibmad/src/smp.c (revision 3423)
+++ management/libibmad/src/smp.c (working copy)
@@ -44,6 +44,7 @@
#include <sys/time.h>
#include <mad.h>
+#include <infiniband/common.h>
#undef DEBUG
#define DEBUG if (ibdebug) WARN
Index: management/libibmad/src/serv.c
===================================================================
--- management/libibmad/src/serv.c (revision 3423)
+++ management/libibmad/src/serv.c (working copy)
@@ -47,6 +47,7 @@
#include <umad.h>
#include <mad.h>
+#include <infiniband/common.h>
#undef DEBUG
#define DEBUG if (ibdebug) WARN
Index: management/libibmad/src/mad.c
===================================================================
--- management/libibmad/src/mad.c (revision 3423)
+++ management/libibmad/src/mad.c (working copy)
@@ -45,6 +45,7 @@
#include <umad.h>
#include <mad.h>
+#include <infiniband/common.h>
#undef DEBUG
#define DEBUG if (ibdebug) WARN
Index: management/libibmad/src/portid.c
===================================================================
--- management/libibmad/src/portid.c (revision 3423)
+++ management/libibmad/src/portid.c (working copy)
@@ -44,6 +44,7 @@
#include <string.h>
#include <mad.h>
+#include <infiniband/common.h>
#undef DEBUG
#define DEBUG if (ibdebug) WARN
Index: management/libibmad/src/sa.c
===================================================================
--- management/libibmad/src/sa.c (revision 3423)
+++ management/libibmad/src/sa.c (working copy)
@@ -44,6 +44,7 @@
#include <sys/time.h>
#include <mad.h>
+#include <infiniband/common.h>
#undef DEBUG
#define DEBUG if (ibdebug) WARN
Index: management/libibmad/src/dump.c
===================================================================
--- management/libibmad/src/dump.c (revision 3423)
+++ management/libibmad/src/dump.c (working copy)
@@ -43,6 +43,7 @@
#include <netinet/in.h>
#include <mad.h>
+#include <infiniband/common.h>
void
mad_dump_int(char *buf, int bufsz, void *val, int valsz)
Index: management/libibmad/src/fields.c
===================================================================
--- management/libibmad/src/fields.c (revision 3423)
+++ management/libibmad/src/fields.c (working copy)
@@ -42,6 +42,7 @@
#include <string.h>
#include <mad.h>
+#include <infiniband/common.h>
/*
* BITSOFFS and BE_OFFS are required due the fact that the bit offsets are inconsistently
Index: management/libibmad/src/vendor.c
===================================================================
--- management/libibmad/src/vendor.c (revision 3423)
+++ management/libibmad/src/vendor.c (working copy)
@@ -44,6 +44,7 @@
#include <sys/time.h>
#include <mad.h>
+#include <infiniband/common.h>
#undef DEBUG
#define DEBUG if (ibdebug) WARN
--
MST
More information about the general
mailing list