staging: lustre: lnet: change lnet_remotenet_t to proper structure
authorJames Simmons <jsimmons@infradead.org>
Mon, 27 Feb 2017 00:41:42 +0000 (19:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:04 +0000 (09:17 +0100)
Change lnet_remotenet_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
drivers/staging/lustre/lnet/lnet/lib-move.c
drivers/staging/lustre/lnet/lnet/router.c
drivers/staging/lustre/lnet/lnet/router_proc.c

index 93e68304ce28bcaecde64b047ddbf416efa4363f..8483a4a8b294895258441a4743dde2f5c3c06af2 100644 (file)
@@ -473,7 +473,7 @@ int lnet_rtrpools_adjust(int tiny, int small, int large);
 int lnet_rtrpools_enable(void);
 void lnet_rtrpools_disable(void);
 void lnet_rtrpools_free(int keep_pools);
-lnet_remotenet_t *lnet_find_net_locked(__u32 net);
+struct lnet_remotenet *lnet_find_net_locked(__u32 net);
 int lnet_dyn_add_ni(lnet_pid_t requested_pid,
                    struct lnet_ioctl_config_data *conf);
 int lnet_dyn_del_ni(__u32 net);
index a0d9cadef8ddcdbb937c7b208d092d9a7c91e4d6..04ad728767628a020923ac3258a173b75cdd7ba0 100644 (file)
@@ -384,12 +384,12 @@ struct lnet_route {
 #define LNET_REMOTE_NETS_HASH_MAX      (1U << 16)
 #define LNET_REMOTE_NETS_HASH_SIZE     (1 << the_lnet.ln_remote_nets_hbits)
 
-typedef struct {
+struct lnet_remotenet {
        struct list_head        lrn_list;       /* chain on
                                                   ln_remote_nets_hash */
        struct list_head        lrn_routes;     /* routes to me */
        __u32                   lrn_net;        /* my net number */
-} lnet_remotenet_t;
+};
 
 /** lnet message has credit and can be submitted to lnd for send/receive */
 #define LNET_CREDIT_OK         0
index 88279eda9f0f08f50f52140003f7bf344365afcb..c03e70133ca8d62afd12cc700682487d38c7fde2 100644 (file)
@@ -1762,7 +1762,7 @@ lnet_dyn_add_ni(lnet_pid_t requested_pid, struct lnet_ioctl_config_data *conf)
        struct lnet_handle_md md_handle;
        struct lnet_ni *ni;
        struct list_head net_head;
-       lnet_remotenet_t *rnet;
+       struct lnet_remotenet *rnet;
        int rc;
 
        INIT_LIST_HEAD(&net_head);
index 9d1ab1f3e06dcded221e289556a29595da19b38d..358110011b22ff2042ef0f3dcb420e660106d1a5 100644 (file)
@@ -998,7 +998,7 @@ static struct lnet_peer *
 lnet_find_route_locked(struct lnet_ni *ni, lnet_nid_t target,
                       lnet_nid_t rtr_nid)
 {
-       lnet_remotenet_t *rnet;
+       struct lnet_remotenet *rnet;
        struct lnet_route *route;
        struct lnet_route *best_route;
        struct lnet_route *last_route;
@@ -2291,7 +2291,7 @@ LNetDist(lnet_nid_t dstnid, lnet_nid_t *srcnidp, __u32 *orderp)
 {
        struct list_head *e;
        struct lnet_ni *ni;
-       lnet_remotenet_t *rnet;
+       struct lnet_remotenet *rnet;
        __u32 dstnet = LNET_NIDNET(dstnid);
        int hops;
        int cpt;
@@ -2348,7 +2348,7 @@ LNetDist(lnet_nid_t dstnid, lnet_nid_t *srcnidp, __u32 *orderp)
 
        rn_list = lnet_net2rnethash(dstnet);
        list_for_each(e, rn_list) {
-               rnet = list_entry(e, lnet_remotenet_t, lrn_list);
+               rnet = list_entry(e, struct lnet_remotenet, lrn_list);
 
                if (rnet->lrn_net == dstnet) {
                        struct lnet_route *route;
index 8e5af05d7a178238848cf61c6377faee74d1710a..9a5faba3ab54981f3d04d2e2e828b19f7a3dcc0e 100644 (file)
@@ -217,10 +217,10 @@ lnet_rtr_decref_locked(struct lnet_peer *lp)
        }
 }
 
-lnet_remotenet_t *
+struct lnet_remotenet *
 lnet_find_net_locked(__u32 net)
 {
-       lnet_remotenet_t *rnet;
+       struct lnet_remotenet *rnet;
        struct list_head *tmp;
        struct list_head *rn_list;
 
@@ -228,7 +228,7 @@ lnet_find_net_locked(__u32 net)
 
        rn_list = lnet_net2rnethash(net);
        list_for_each(tmp, rn_list) {
-               rnet = list_entry(tmp, lnet_remotenet_t, lrn_list);
+               rnet = list_entry(tmp, struct lnet_remotenet, lrn_list);
 
                if (rnet->lrn_net == net)
                        return rnet;
@@ -268,7 +268,7 @@ static void lnet_shuffle_seed(void)
 
 /* NB expects LNET_LOCK held */
 static void
-lnet_add_route_to_rnet(lnet_remotenet_t *rnet, struct lnet_route *route)
+lnet_add_route_to_rnet(struct lnet_remotenet *rnet, struct lnet_route *route)
 {
        unsigned int len = 0;
        unsigned int offset = 0;
@@ -299,8 +299,8 @@ lnet_add_route(__u32 net, __u32 hops, lnet_nid_t gateway,
               unsigned int priority)
 {
        struct list_head *e;
-       lnet_remotenet_t *rnet;
-       lnet_remotenet_t *rnet2;
+       struct lnet_remotenet *rnet;
+       struct lnet_remotenet *rnet2;
        struct lnet_route *route;
        struct lnet_ni *ni;
        int add_route;
@@ -416,7 +416,7 @@ lnet_add_route(__u32 net, __u32 hops, lnet_nid_t gateway,
 int
 lnet_check_routes(void)
 {
-       lnet_remotenet_t *rnet;
+       struct lnet_remotenet *rnet;
        struct lnet_route *route;
        struct lnet_route *route2;
        struct list_head *e1;
@@ -430,7 +430,7 @@ lnet_check_routes(void)
        for (i = 0; i < LNET_REMOTE_NETS_HASH_SIZE; i++) {
                rn_list = &the_lnet.ln_remote_nets_hash[i];
                list_for_each(e1, rn_list) {
-                       rnet = list_entry(e1, lnet_remotenet_t, lrn_list);
+                       rnet = list_entry(e1, struct lnet_remotenet, lrn_list);
 
                        route2 = NULL;
                        list_for_each(e2, &rnet->lrn_routes) {
@@ -472,7 +472,7 @@ int
 lnet_del_route(__u32 net, lnet_nid_t gw_nid)
 {
        struct lnet_peer *gateway;
-       lnet_remotenet_t *rnet;
+       struct lnet_remotenet *rnet;
        struct lnet_route *route;
        struct list_head *e1;
        struct list_head *e2;
@@ -495,7 +495,7 @@ lnet_del_route(__u32 net, lnet_nid_t gw_nid)
 
  again:
        list_for_each(e1, rn_list) {
-               rnet = list_entry(e1, lnet_remotenet_t, lrn_list);
+               rnet = list_entry(e1, struct lnet_remotenet, lrn_list);
 
                if (!(net == LNET_NIDNET(LNET_NID_ANY) ||
                      net == rnet->lrn_net))
@@ -588,7 +588,7 @@ lnet_get_route(int idx, __u32 *net, __u32 *hops,
 {
        struct list_head *e1;
        struct list_head *e2;
-       lnet_remotenet_t *rnet;
+       struct lnet_remotenet *rnet;
        struct lnet_route *route;
        int cpt;
        int i;
@@ -599,7 +599,7 @@ lnet_get_route(int idx, __u32 *net, __u32 *hops,
        for (i = 0; i < LNET_REMOTE_NETS_HASH_SIZE; i++) {
                rn_list = &the_lnet.ln_remote_nets_hash[i];
                list_for_each(e1, rn_list) {
-                       rnet = list_entry(e1, lnet_remotenet_t, lrn_list);
+                       rnet = list_entry(e1, struct lnet_remotenet, lrn_list);
 
                        list_for_each(e2, &rnet->lrn_routes) {
                                route = list_entry(e2, struct lnet_route,
index 1b2817c6f1fae8a3c931fda3fa6298e77a4a165c..779ec69a41fe53986bebd09902e0110b8ba407ec 100644 (file)
@@ -172,7 +172,7 @@ static int proc_lnet_routes(struct ctl_table *table, int write,
                struct list_head *n;
                struct list_head *r;
                struct lnet_route *route = NULL;
-               lnet_remotenet_t *rnet  = NULL;
+               struct lnet_remotenet *rnet  = NULL;
                int skip  = off - 1;
                struct list_head *rn_list;
                int i;
@@ -191,7 +191,7 @@ static int proc_lnet_routes(struct ctl_table *table, int write,
                        n = rn_list->next;
 
                        while (n != rn_list && !route) {
-                               rnet = list_entry(n, lnet_remotenet_t,
+                               rnet = list_entry(n, struct lnet_remotenet,
                                                  lrn_list);
 
                                r = rnet->lrn_routes.next;