staging: lustre: lnet: change lnet_handle_wire_t to proper structure
authorJames Simmons <jsimmons@infradead.org>
Sun, 22 Jan 2017 00:40:25 +0000 (19:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Jan 2017 08:59:04 +0000 (09:59 +0100)
Change lnet_handle_wire_t from typedef to proper structure.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24566
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/lnet/lib-lnet.h
drivers/staging/lustre/include/linux/lnet/types.h
drivers/staging/lustre/lnet/lnet/api-ni.c
drivers/staging/lustre/lnet/lnet/lib-move.c
drivers/staging/lustre/lnet/lnet/lib-msg.c

index a59c5e99cbd3ca4ec3e69b7f6396aa5b5254c24a..363342f362af5953a0e84410cdf16c63d1740e1e 100644 (file)
@@ -78,7 +78,7 @@ static inline int lnet_is_route_alive(lnet_route_t *route)
        return route->lr_downis == 0;
 }
 
-static inline int lnet_is_wire_handle_none(lnet_handle_wire_t *wh)
+static inline int lnet_is_wire_handle_none(struct lnet_handle_wire *wh)
 {
        return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_COOKIE_NONE &&
                wh->wh_object_cookie == LNET_WIRE_HANDLE_COOKIE_NONE);
@@ -323,7 +323,7 @@ lnet_handle2md(lnet_handle_md_t *handle)
 }
 
 static inline lnet_libmd_t *
-lnet_wire_handle2md(lnet_handle_wire_t *wh)
+lnet_wire_handle2md(struct lnet_handle_wire *wh)
 {
        /* ALWAYS called with resource lock held */
        lnet_libhandle_t *lh;
index 8ca1e9d0cfe2b4f539e0ce981476dc80cf15c88c..1787089009abee87d505e722b6e46e8642e321ba 100644 (file)
@@ -127,10 +127,10 @@ typedef struct {
  * reboots).  The object cookie only matches one object on that interface
  * during that object's lifetime (i.e. no cookie re-use).
  */
-typedef struct {
+struct lnet_handle_wire {
        __u64   wh_interface_cookie;
        __u64   wh_object_cookie;
-} WIRE_ATTR lnet_handle_wire_t;
+} WIRE_ATTR;
 
 typedef enum {
        LNET_MSG_ACK = 0,
@@ -147,13 +147,13 @@ typedef enum {
  * end.
  */
 typedef struct lnet_ack {
-       lnet_handle_wire_t      dst_wmd;
+       struct lnet_handle_wire dst_wmd;
        __u64                   match_bits;
        __u32                   mlength;
 } WIRE_ATTR lnet_ack_t;
 
 typedef struct lnet_put {
-       lnet_handle_wire_t      ack_wmd;
+       struct lnet_handle_wire ack_wmd;
        __u64                   match_bits;
        __u64                   hdr_data;
        __u32                   ptl_index;
@@ -161,7 +161,7 @@ typedef struct lnet_put {
 } WIRE_ATTR lnet_put_t;
 
 typedef struct lnet_get {
-       lnet_handle_wire_t      return_wmd;
+       struct lnet_handle_wire return_wmd;
        __u64                   match_bits;
        __u32                   ptl_index;
        __u32                   src_offset;
@@ -169,7 +169,7 @@ typedef struct lnet_get {
 } WIRE_ATTR lnet_get_t;
 
 typedef struct lnet_reply {
-       lnet_handle_wire_t      dst_wmd;
+       struct lnet_handle_wire dst_wmd;
 } WIRE_ATTR lnet_reply_t;
 
 typedef struct lnet_hello {
index b2ba10d59f84624753d0675b8f45dd1cc02a04ba..3a7788c522423925b5d1a6874f44209ba49bde42 100644 (file)
@@ -190,11 +190,11 @@ static void lnet_assert_wire_constants(void)
        CLASSERT(LNET_MSG_HELLO == 4);
 
        /* Checks for struct ptl_handle_wire_t */
-       CLASSERT((int)sizeof(lnet_handle_wire_t) == 16);
-       CLASSERT((int)offsetof(lnet_handle_wire_t, wh_interface_cookie) == 0);
-       CLASSERT((int)sizeof(((lnet_handle_wire_t *)0)->wh_interface_cookie) == 8);
-       CLASSERT((int)offsetof(lnet_handle_wire_t, wh_object_cookie) == 8);
-       CLASSERT((int)sizeof(((lnet_handle_wire_t *)0)->wh_object_cookie) == 8);
+       CLASSERT((int)sizeof(struct lnet_handle_wire) == 16);
+       CLASSERT((int)offsetof(struct lnet_handle_wire, wh_interface_cookie) == 0);
+       CLASSERT((int)sizeof(((struct lnet_handle_wire *)0)->wh_interface_cookie) == 8);
+       CLASSERT((int)offsetof(struct lnet_handle_wire, wh_object_cookie) == 8);
+       CLASSERT((int)sizeof(((struct lnet_handle_wire *)0)->wh_object_cookie) == 8);
 
        /* Checks for struct lnet_magicversion_t */
        CLASSERT((int)sizeof(lnet_magicversion_t) == 8);
index f3dd6e42f4d464f5796dbfb0edd4b837be0a8353..595fde8d2e6f1ee661f8a4e3c3b416db8547de63 100644 (file)
@@ -1326,7 +1326,7 @@ lnet_parse_get(lnet_ni_t *ni, lnet_msg_t *msg, int rdma_get)
 {
        struct lnet_match_info info;
        lnet_hdr_t *hdr = &msg->msg_hdr;
-       lnet_handle_wire_t reply_wmd;
+       struct lnet_handle_wire reply_wmd;
        int rc;
 
        /* Convert get fields to host byte order */
index 0897e588bd548e0ebc1f173975dd39cebc022396..12626168fb7eea1da967b0eae10a31e096d2352b 100644 (file)
@@ -361,7 +361,7 @@ lnet_msg_detach_md(lnet_msg_t *msg, int status)
 static int
 lnet_complete_msg_locked(lnet_msg_t *msg, int cpt)
 {
-       lnet_handle_wire_t ack_wmd;
+       struct lnet_handle_wire ack_wmd;
        int rc;
        int status = msg->msg_ev.status;