[openib-general] RE: [PATCH] iSER: fix cast warning on 32-bit archs

Dan Bar Dov danb at voltaire.com
Wed Nov 30 10:14:29 PST 2005


Applied.
Thanks,

Dan 

> -----Original Message-----
> From: Roland Dreier [mailto:rolandd at cisco.com] 
> Sent: Tuesday, November 29, 2005 8:50 PM
> To: Dan Bar Dov
> Cc: openib-general at openib.org
> Subject: [PATCH] iSER: fix cast warning on 32-bit archs
> 
> Fix the warning
> 
>     iser_verbs.c:692: warning: cast to pointer from integer 
> of different size
> 
> on 32-bit architectures -- work request ID needs to be cast to long
> before being cast to a pointer.
> 
> Signed-off-by: Roland Dreier <rolandd at cisco.com>
> 
> --- infiniband/ulp/iser/iser_verbs.c	(revision 4210)
> +++ infiniband/ulp/iser/iser_verbs.c	(working copy)
> @@ -1,5 +1,6 @@
>  /*
>   * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
> + * Copyright (c) 2005 Cisco Systems.  All rights reserved.
>   *
>   * This software is available to you under a choice of one of two
>   * licenses.  You may choose to be licensed under the terms 
> of the GNU
> @@ -689,7 +690,7 @@ static void iser_cq_callback(struct ib_c
>  	unsigned long	    xfer_len;
>  
>  	while (ib_poll_cq(cq, 1, &wc) == 1) {
> -		p_dto	 = (struct iser_dto *)wc.wr_id;
> +		p_dto	 = (struct iser_dto *) (unsigned long) wc.wr_id;
>  
>  		if (p_dto == NULL || p_dto->type >= ISER_DTO_PASSIVE)
>  			iser_bug("NULL p_dto %p or unexpected 
> type\n", p_dto);
> 



More information about the general mailing list