From 5092d17a39a454d8b045a8cdce514bf4b07d22dc Mon Sep 17 00:00:00 2001 From: Parav Pandit Date: Tue, 14 Nov 2017 14:52:11 +0200 Subject: [PATCH] RDMA/core: Avoid copying ifindex twice rdma_copy_addr copies the ifndex to bound_dev_if. Therefore avoid copying it again after rdma_copy_addr call is completed. Signed-off-by: Parav Pandit Reviewed-by: Moni Shoua Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/addr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 0ae18608761c..a5b4cf030c11 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -265,7 +265,6 @@ int rdma_translate_ip(const struct sockaddr *addr, return -EADDRNOTAVAIL; rdma_copy_addr(dev_addr, dev, NULL); - dev_addr->bound_dev_if = dev->ifindex; dev_put(dev); break; #if IS_ENABLED(CONFIG_IPV6) @@ -276,7 +275,6 @@ int rdma_translate_ip(const struct sockaddr *addr, &((const struct sockaddr_in6 *)addr)->sin6_addr, dev, 1)) { rdma_copy_addr(dev_addr, dev, NULL); - dev_addr->bound_dev_if = dev->ifindex; break; } } -- 2.30.2