[lustre-devel] [PATCH 578/622] lnet: Remove unused vars in lnet_find_route_locked
James Simmons
jsimmons at infradead.org
Thu Feb 27 13:17:26 PST 2020
From: Chris Horn <hornc at cray.com>
The lp and lp_best variables are not needed in
lnet_find_route_locked().
WC-bug-id: https://jira.whamcloud.com/browse/LU-12756
Lustre-commit: b129f7b1f76a ("LU-12756 lnet: Remove unused vars in lnet_find_route_locked")
Signed-off-by: Chris Horn <hornc at cray.com>
Reviewed-on: https://review.whamcloud.com/36620
Reviewed-by: Alexandr Boyko <c17825 at cray.com>
Reviewed-by: Alexey Lyashkov <c17817 at cray.com>
Reviewed-by: Amir Shehata <ashehata at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
net/lnet/lnet/lib-move.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/net/lnet/lnet/lib-move.c b/net/lnet/lnet/lib-move.c
index 03d629d..b7990c9 100644
--- a/net/lnet/lnet/lib-move.c
+++ b/net/lnet/lnet/lib-move.c
@@ -1331,24 +1331,18 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
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 = NULL;
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) {
+ if (!best_route) {
best_route = route;
last_route = route;
- lp_best = lp;
best_gw_ni = lnet_find_best_lpni_on_net(NULL,
LNET_NID_ANY,
route->lr_gateway,
@@ -1366,7 +1360,6 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
continue;
best_route = route;
- lp_best = lp;
}
*prev_route = last_route;
--
1.8.3.1
More information about the lustre-devel
mailing list