From 8d38912a8445060ccb5ca64f956ed8c4d584a904 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Thu, 15 Nov 2012 17:13:02 +0800 Subject: [PATCH] LU-2335 lnet: remove unnecessary libcfs include libcfs_pack/unpack.h are only needed for WINNT. Only include them when necessary. Signed-off-by: Peng Tao Change-Id: Ibe6230d37534fd087c2afe6166d10259fd59c076 Reviewed-on: http://review.whamcloud.com/4647 Tested-by: Hudson Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: John Hammond --- lnet/include/lnet/lib-types.h | 8 ++------ lnet/include/lnet/lnetst.h | 4 +++- lnet/include/lnet/socklnd.h | 5 +++-- lnet/selftest/rpc.h | 5 +++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index 4d4ca7c..73b9580 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -48,6 +48,8 @@ #include #elif defined(__WINNT__) #include +#include +#include #else #error Unsupported Operating System #endif @@ -59,7 +61,6 @@ #define WIRE_ATTR __attribute__((packed)) /* Packed version of lnet_process_id_t to transfer via network */ -#include typedef struct { lnet_nid_t nid; lnet_pid_t pid; /* node id / process id */ @@ -73,7 +74,6 @@ typedef struct { __u64 wh_interface_cookie; __u64 wh_object_cookie; } WIRE_ATTR lnet_handle_wire_t; -#include typedef enum { LNET_MSG_ACK = 0, @@ -87,7 +87,6 @@ typedef enum { * byte boundary in the message header. Note that all types used in these * wire structs MUST be fixed size and the smaller types are placed at the * end. */ -#include typedef struct lnet_ack { lnet_handle_wire_t dst_wmd; __u64 match_bits; @@ -177,7 +176,6 @@ typedef struct { __u32 acr_version; /* protocol version */ __u64 acr_nid; /* target NID */ } WIRE_ATTR lnet_acceptor_connreq_t; -#include #define LNET_PROTO_ACCEPTOR_VERSION 1 @@ -557,7 +555,6 @@ typedef struct { lnet_kiov_t rb_kiov[0]; /* the buffer space */ } lnet_rtrbuf_t; -#include typedef struct { __u32 msgs_alloc; __u32 msgs_max; @@ -571,7 +568,6 @@ typedef struct { __u64 route_length; __u64 drop_length; } WIRE_ATTR lnet_counters_t; -#include #define LNET_PEER_HASHSIZE 503 /* prime! */ diff --git a/lnet/include/lnet/lnetst.h b/lnet/include/lnet/lnetst.h index 6375423..22e3527 100644 --- a/lnet/include/lnet/lnetst.h +++ b/lnet/include/lnet/lnetst.h @@ -469,7 +469,10 @@ typedef struct { } lst_test_ping_param_t; /* more tests */ +#ifdef __WINNT__ #include +#include +#endif typedef struct { __u32 errors; __u32 rpcs_sent; @@ -488,6 +491,5 @@ typedef struct { __u32 brw_errors; __u32 ping_errors; } WIRE_ATTR sfw_counters_t; -#include #endif diff --git a/lnet/include/lnet/socklnd.h b/lnet/include/lnet/socklnd.h index 8a20eaf..120fedd 100644 --- a/lnet/include/lnet/socklnd.h +++ b/lnet/include/lnet/socklnd.h @@ -50,7 +50,10 @@ #define SOCKLND_CONN_ACK SOCKLND_CONN_BULK_IN +#ifdef __WINNT__ #include +#include +#endif typedef struct { __u32 kshm_magic; /* magic number of socklnd message */ __u32 kshm_version; /* version of socklnd message */ @@ -93,8 +96,6 @@ socklnd_init_msg(ksock_msg_t *msg, int type) msg->ksm_zc_cookies[0] = msg->ksm_zc_cookies[1] = 0; } -#include - #define KSOCK_MSG_NOOP 0xc0 /* ksm_u empty */ #define KSOCK_MSG_LNET 0xc1 /* lnet msg */ diff --git a/lnet/selftest/rpc.h b/lnet/selftest/rpc.h index 71b9054..d9cdca5 100644 --- a/lnet/selftest/rpc.h +++ b/lnet/selftest/rpc.h @@ -65,7 +65,10 @@ typedef enum { SRPC_MSG_JOIN_REPLY = 17, } srpc_msg_type_t; +#ifdef __WINNT__ #include +#include +#endif /* CAVEAT EMPTOR: * All srpc_*_reqst_t's 1st field must be matchbits of reply buffer, @@ -284,8 +287,6 @@ typedef struct srpc_msg { } msg_body; } WIRE_ATTR srpc_msg_t; -#include - static inline void srpc_unpack_msg_hdr(srpc_msg_t *msg) { -- 1.8.3.1