staging: lustre: lnet: change lnet_libhandle_t to proper structure
authorJames Simmons <jsimmons@infradead.org>
Mon, 27 Feb 2017 00:41:32 +0000 (19:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:04 +0000 (09:17 +0100)
Change lnet_libhandle_t from typedef to proper structure.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/20831
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@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/lib-types.h
drivers/staging/lustre/lnet/lnet/api-ni.c

index e89499012e5bc405c5456b14b8fc30288fd9fc03..1c147b3398f967aad1b37d5a08f6a763b5f46519 100644 (file)
@@ -266,12 +266,12 @@ lnet_msg_free(struct lnet_msg *msg)
        LIBCFS_FREE(msg, sizeof(*msg));
 }
 
-lnet_libhandle_t *lnet_res_lh_lookup(struct lnet_res_container *rec,
-                                    __u64 cookie);
+struct lnet_libhandle *lnet_res_lh_lookup(struct lnet_res_container *rec,
+                                         __u64 cookie);
 void lnet_res_lh_initialize(struct lnet_res_container *rec,
-                           lnet_libhandle_t *lh);
+                           struct lnet_libhandle *lh);
 static inline void
-lnet_res_lh_invalidate(lnet_libhandle_t *lh)
+lnet_res_lh_invalidate(struct lnet_libhandle *lh)
 {
        /* NB: cookie is still useful, don't reset it */
        list_del(&lh->lh_hash_chain);
@@ -291,7 +291,7 @@ lnet_eq2handle(struct lnet_handle_eq *handle, lnet_eq_t *eq)
 static inline lnet_eq_t *
 lnet_handle2eq(struct lnet_handle_eq *handle)
 {
-       lnet_libhandle_t *lh;
+       struct lnet_libhandle *lh;
 
        lh = lnet_res_lh_lookup(&the_lnet.ln_eq_container, handle->cookie);
        if (!lh)
@@ -310,7 +310,7 @@ static inline lnet_libmd_t *
 lnet_handle2md(struct lnet_handle_md *handle)
 {
        /* ALWAYS called with resource lock held */
-       lnet_libhandle_t *lh;
+       struct lnet_libhandle *lh;
        int cpt;
 
        cpt = lnet_cpt_of_cookie(handle->cookie);
@@ -326,7 +326,7 @@ static inline lnet_libmd_t *
 lnet_wire_handle2md(struct lnet_handle_wire *wh)
 {
        /* ALWAYS called with resource lock held */
-       lnet_libhandle_t *lh;
+       struct lnet_libhandle *lh;
        int cpt;
 
        if (wh->wh_interface_cookie != the_lnet.ln_interface_cookie)
@@ -351,7 +351,7 @@ static inline lnet_me_t *
 lnet_handle2me(struct lnet_handle_me *handle)
 {
        /* ALWAYS called with resource lock held */
-       lnet_libhandle_t *lh;
+       struct lnet_libhandle *lh;
        int cpt;
 
        cpt = lnet_cpt_of_cookie(handle->cookie);
index e3cb795e237935e29fd3c43cd3197ea6d1623620..9f301f4bbd892c8b05ef0487544d243da4d609ef 100644 (file)
@@ -108,17 +108,17 @@ struct lnet_msg {
        struct lnet_hdr          msg_hdr;
 };
 
-typedef struct lnet_libhandle {
+struct lnet_libhandle {
        struct list_head        lh_hash_chain;
        __u64                   lh_cookie;
-} lnet_libhandle_t;
+};
 
 #define lh_entry(ptr, type, member) \
        ((type *)((char *)(ptr) - (char *)(&((type *)0)->member)))
 
 typedef struct lnet_eq {
        struct list_head          eq_list;
-       lnet_libhandle_t          eq_lh;
+       struct lnet_libhandle     eq_lh;
        lnet_seq_t                eq_enq_seq;
        lnet_seq_t                eq_deq_seq;
        unsigned int              eq_size;
@@ -129,7 +129,7 @@ typedef struct lnet_eq {
 
 typedef struct lnet_me {
        struct list_head         me_list;
-       lnet_libhandle_t         me_lh;
+       struct lnet_libhandle    me_lh;
        lnet_process_id_t        me_match_id;
        unsigned int             me_portal;
        unsigned int             me_pos;        /* hash offset in mt_hash */
@@ -141,7 +141,7 @@ typedef struct lnet_me {
 
 typedef struct lnet_libmd {
        struct list_head         md_list;
-       lnet_libhandle_t         md_lh;
+       struct lnet_libhandle    md_lh;
        lnet_me_t               *md_me;
        char                    *md_start;
        unsigned int             md_offset;
index 5161b8ae6a2c199f9540041a0205a60c1484efa1..4c9a0648951b5e81645e39e16cbb7f2779a6fb12 100644 (file)
@@ -483,12 +483,12 @@ lnet_res_containers_create(int type)
        return recs;
 }
 
-lnet_libhandle_t *
+struct lnet_libhandle *
 lnet_res_lh_lookup(struct lnet_res_container *rec, __u64 cookie)
 {
        /* ALWAYS called with lnet_res_lock held */
        struct list_head *head;
-       lnet_libhandle_t *lh;
+       struct lnet_libhandle *lh;
        unsigned int hash;
 
        if ((cookie & LNET_COOKIE_MASK) != rec->rec_type)
@@ -506,7 +506,8 @@ lnet_res_lh_lookup(struct lnet_res_container *rec, __u64 cookie)
 }
 
 void
-lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh)
+lnet_res_lh_initialize(struct lnet_res_container *rec,
+                      struct lnet_libhandle *lh)
 {
        /* ALWAYS called with lnet_res_lock held */
        unsigned int ibits = LNET_COOKIE_TYPE_BITS + LNET_CPT_BITS;