[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1828884A29C6694DAF28B7E6B8A82373A8FC8979@ORSMSX109.amr.corp.intel.com>
Date: Wed, 29 Apr 2015 16:57:54 +0000
From: "Hefty, Sean" <sean.hefty@...el.com>
To: Honggang Li <honli@...hat.com>,
"roland@...nel.org" <roland@...nel.org>,
"hal.rosenstock@...il.com" <hal.rosenstock@...il.com>,
"ork@...lanox.com" <ork@...lanox.com>,
"ogerlitz@...lanox.com" <ogerlitz@...lanox.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [linux-next PATCH] IB/core: change rdma_gid2ip into void
function as it always return zero
> Signed-off-by: Honggang Li <honli@...hat.com>
Acked-by: Sean Hefty <sean.hefty@...el.com>
> ---
> drivers/infiniband/core/addr.c | 13 +++----------
> include/rdma/ib_addr.h | 3 +--
> 2 files changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/infiniband/core/addr.c
> b/drivers/infiniband/core/addr.c
> index f80da50..38339d2 100644
> --- a/drivers/infiniband/core/addr.c
> +++ b/drivers/infiniband/core/addr.c
> @@ -472,13 +472,8 @@ int rdma_addr_find_dmac_by_grh(union ib_gid *sgid,
> union ib_gid *dgid, u8 *dmac,
> } sgid_addr, dgid_addr;
>
>
> - ret = rdma_gid2ip(&sgid_addr._sockaddr, sgid);
> - if (ret)
> - return ret;
> -
> - ret = rdma_gid2ip(&dgid_addr._sockaddr, dgid);
> - if (ret)
> - return ret;
> + rdma_gid2ip(&sgid_addr._sockaddr, sgid);
> + rdma_gid2ip(&dgid_addr._sockaddr, dgid);
>
> memset(&dev_addr, 0, sizeof(dev_addr));
>
> @@ -512,10 +507,8 @@ int rdma_addr_find_smac_by_sgid(union ib_gid *sgid,
> u8 *smac, u16 *vlan_id)
> struct sockaddr_in6 _sockaddr_in6;
> } gid_addr;
>
> - ret = rdma_gid2ip(&gid_addr._sockaddr, sgid);
> + rdma_gid2ip(&gid_addr._sockaddr, sgid);
>
> - if (ret)
> - return ret;
> memset(&dev_addr, 0, sizeof(dev_addr));
> ret = rdma_translate_ip(&gid_addr._sockaddr, &dev_addr, vlan_id);
> if (ret)
> diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
> index ce55906..ac54c27 100644
> --- a/include/rdma/ib_addr.h
> +++ b/include/rdma/ib_addr.h
> @@ -160,7 +160,7 @@ static inline int rdma_ip2gid(struct sockaddr *addr,
> union ib_gid *gid)
> }
>
> /* Important - sockaddr should be a union of sockaddr_in and sockaddr_in6
> */
> -static inline int rdma_gid2ip(struct sockaddr *out, union ib_gid *gid)
> +static inline void rdma_gid2ip(struct sockaddr *out, union ib_gid *gid)
> {
> if (ipv6_addr_v4mapped((struct in6_addr *)gid)) {
> struct sockaddr_in *out_in = (struct sockaddr_in *)out;
> @@ -173,7 +173,6 @@ static inline int rdma_gid2ip(struct sockaddr *out,
> union ib_gid *gid)
> out_in->sin6_family = AF_INET6;
> memcpy(&out_in->sin6_addr.s6_addr, gid->raw, 16);
> }
> - return 0;
> }
>
> static inline void iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr,
> --
> 1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists