[ewg] Re: [PATCH] RDMA/CMA: fix compilation warning cma.c:2076

Vladimir Sokolovsky vlad at mellanox.co.il
Wed Apr 1 08:07:50 PDT 2009


On Wed, 2009-04-01 at 02:52 -0500, Chien Tung wrote:
> Add a cast to struct sockaddr * for argument to ip_addr_size().
> 
> Signed-off-by: Chien Tung <chien.tin.tung at intel.com>
> ---
>  .../fixes/cma_0100_unified_tcp_ports.patch         |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel_patches/fixes/cma_0100_unified_tcp_ports.patch b/kernel_patches/fixes/cma_0100_unified_tcp_ports.patch
> index 9b4bc07..e79bee3 100644
> --- a/kernel_patches/fixes/cma_0100_unified_tcp_ports.patch
> +++ b/kernel_patches/fixes/cma_0100_unified_tcp_ports.patch
> @@ -69,7 +69,7 @@ Index: ofed_kernel/drivers/infiniband/core/cma.c
>  +		sock_release(sock);
>  +		return ret;
>  +	}
> -+	size = ip_addr_size(&id_priv->id.route.addr.src_addr);
> ++	size = ip_addr_size((struct sockaddr *) &id_priv->id.route.addr.src_addr);
>  +	ret = sock->ops->getname(sock,
>  +			(struct sockaddr *) &id_priv->id.route.addr.src_addr,
>  +			&size, 0);

Hello Chien,
This patch was already applied to the OFED's kernel git tree:

commit 25a5b1d3143cba117b992ae9c0b90d11e6042508
Author: John Gregor <john.gregor at qlogic.com>
Date:   Thu Mar 12 18:11:10 2009 -0700

    IB/core: fix build warning
    
    Eliminates the following build warning:
    
      CC [M]  ./drivers/infiniband/core/cma.o
    ./drivers/infiniband/core/cma.c: In function 'cma_get_tcp_port':
    ./drivers/infiniband/core/cma.c:2076: warning: passing argument 1 of 'ip_addr_size' from incompatible pointer type
    
    Signed-off-by: John Gregor <john.gregor at qlogic.com>
    Signed-off-by: Yannick Cote <yannick.cote at qlogic.com>

Regards,
Vladimir



More information about the ewg mailing list