Whamcloud - gitweb
LU-12756 lnet: Remove unused vars in lnet_find_route_locked 20/36620/2
authorChris Horn <hornc@cray.com>
Sun, 27 Oct 2019 19:35:05 +0000 (14:35 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Jan 2020 04:04:10 +0000 (04:04 +0000)
The lp and lp_best variables are not needed in
lnet_find_route_locked().

Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I61a7097ab66703a1af1346c7301b9efc7e4392c9
Reviewed-on: https://review.whamcloud.com/36620
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-move.c

index e9daed8..b1b2252 100644 (file)
@@ -1517,22 +1517,16 @@ lnet_find_route_locked(struct lnet_remotenet *rnet,
        struct lnet_peer_ni *best_gw_ni = NULL;
        struct lnet_route *best_route;
        struct lnet_route *last_route;
-       struct lnet_peer *lp_best;
        struct lnet_route *route;
-       struct lnet_peer *lp;
        int rc;
 
-       lp_best = NULL;
        best_route = last_route = NULL;
        list_for_each_entry(route, &rnet->lrn_routes, lr_list) {
-               lp = route->lr_gateway;
-
                if (!lnet_is_route_alive(route))
                        continue;
 
-               if (lp_best == NULL) {
+               if (!best_route) {
                        best_route = last_route = route;
-                       lp_best = lp;
                        best_gw_ni = lnet_find_best_lpni_on_net(NULL,
                                                                LNET_NID_ANY,
                                                                route->lr_gateway,
@@ -1550,7 +1544,6 @@ lnet_find_route_locked(struct lnet_remotenet *rnet,
                        continue;
 
                best_route = route;
-               lp_best = lp;
        }
 
        *prev_route = last_route;