From: Joe Perches Date: Sun, 16 Dec 2007 21:47:33 +0000 (-0800) Subject: [IPV4] drivers/infiniband: Use ipv4_is_ X-Git-Tag: MMI-PSA29.97-13-9~37648^2~1066 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6360a02af1599e46b023ccbb85545ed97c6f662c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [IPV4] drivers/infiniband: Use ipv4_is_ Signed-off-by: Joe Perches Signed-off-by: David S. Miller --- diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 5381c80de10a..0802b79c552d 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -265,11 +265,11 @@ static int addr_resolve_local(struct sockaddr_in *src_in, if (!dev) return -EADDRNOTAVAIL; - if (ZERONET(src_ip)) { + if (ipv4_is_zeronet(src_ip)) { src_in->sin_family = dst_in->sin_family; src_in->sin_addr.s_addr = dst_ip; ret = rdma_copy_addr(addr, dev, dev->dev_addr); - } else if (LOOPBACK(src_ip)) { + } else if (ipv4_is_loopback(src_ip)) { ret = rdma_translate_ip((struct sockaddr *)dst_in, addr); if (!ret) memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN); diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 637efead97a0..15b7e9fb615a 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -630,7 +630,8 @@ static inline int cma_zero_addr(struct sockaddr *addr) struct in6_addr *ip6; if (addr->sa_family == AF_INET) - return ZERONET(((struct sockaddr_in *) addr)->sin_addr.s_addr); + return ipv4_is_zeronet( + ((struct sockaddr_in *)addr)->sin_addr.s_addr); else { ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr; return (ip6->s6_addr32[0] | ip6->s6_addr32[1] | @@ -640,7 +641,7 @@ static inline int cma_zero_addr(struct sockaddr *addr) static inline int cma_loopback_addr(struct sockaddr *addr) { - return LOOPBACK(((struct sockaddr_in *) addr)->sin_addr.s_addr); + return ipv4_is_loopback(((struct sockaddr_in *) addr)->sin_addr.s_addr); } static inline int cma_any_addr(struct sockaddr *addr)