[openib-general] [PATCH][SDP] Remove sparse warning about use of 0 instead of NULL

Libor Michalek libor at topspin.com
Fri Feb 11 17:59:51 PST 2005


On Fri, Feb 11, 2005 at 05:44:29PM -0800, Tom Duffy wrote:
> Remove sparse warnings:
> 
> warning: Using plain integer as NULL pointer

Thanks, commited the change.

-Libor

> Signed-off-by: Tom Duffy <tduffy at sun.com>
> 
> Index: drivers/infiniband/ulp/sdp/sdp_send.c
> ===================================================================
> --- drivers/infiniband/ulp/sdp/sdp_send.c	(revision 1778)
> +++ drivers/infiniband/ulp/sdp/sdp_send.c	(working copy)
> @@ -32,7 +32,7 @@
>  /*.._sdp_send_buff_post -- Post a buffer send on a SDP connection. */
>  static int _sdp_send_buff_post(struct sdp_opt *conn, struct sdpc_buff *buff)
>  {
> -	struct ib_send_wr send_param = { 0 };
> +	struct ib_send_wr send_param = { NULL };
>  	struct ib_send_wr *bad_wr;
>  	int result;
>  
> @@ -322,7 +322,7 @@ error:
>  static int _sdp_send_data_buff_snk(struct sdp_opt *conn,
>  				   struct sdpc_buff *buff)
>  {
> -	struct ib_send_wr send_param = { 0 };
> +	struct ib_send_wr send_param = { NULL };
>  	struct ib_send_wr *bad_wr;
>  	struct sdpc_advt *advt;
>  	int result;
> @@ -471,7 +471,7 @@ error:
>  static int _sdp_send_data_iocb_snk(struct sdp_opt *conn,
>  				   struct sdpc_iocb *iocb)
>  {
> -	struct ib_send_wr send_param = { 0 };
> +	struct ib_send_wr send_param = { NULL };
>  	struct ib_send_wr *bad_wr;
>  	struct ib_sge sg_val;
>  	struct sdpc_advt *advt;
> Index: drivers/infiniband/ulp/sdp/sdp_recv.c
> ===================================================================
> --- drivers/infiniband/ulp/sdp/sdp_recv.c	(revision 1778)
> +++ drivers/infiniband/ulp/sdp/sdp_recv.c	(working copy)
> @@ -31,7 +31,7 @@
>  /*.._sdp_post_recv_buff -- post a single buffers for data recv */
>  static int _sdp_post_recv_buff(struct sdp_opt *conn)
>  {
> -	struct ib_recv_wr receive_param = { 0 };
> +	struct ib_recv_wr receive_param = { NULL };
>  	struct ib_recv_wr *bad_wr;
>  	struct sdpc_buff *buff;
>  	s32 result;
> @@ -108,7 +108,7 @@ error:
>  /*.._sdp_post_rdma_buff -- post a single buffers for rdma read on a conn */
>  static int _sdp_post_rdma_buff(struct sdp_opt *conn)
>  {
> -	struct ib_send_wr send_param = { 0 };
> +	struct ib_send_wr send_param = { NULL };
>  	struct ib_send_wr *bad_wr;
>  	struct sdpc_advt *advt;
>  	struct sdpc_buff *buff;
> @@ -237,7 +237,7 @@ done:
>  /*.._sdp_post_rdma_iocb_src -- post a iocb for rdma read on a conn */
>  static int _sdp_post_rdma_iocb_src(struct sdp_opt *conn)
>  {
> -	struct ib_send_wr send_param = { 0 };
> +	struct ib_send_wr send_param = { NULL };
>  	struct ib_send_wr *bad_wr;
>  	struct ib_sge sg_val;
>  	struct sdpc_iocb *iocb;
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list