[openib-general] Re: [PATCH] [udapl] fix build for x86_64

James Lentini jlentini at netapp.com
Tue Jun 28 06:42:46 PDT 2005


Arlin,

Would this be a more standard way to do the cast:

On Mon, 27 Jun 2005, Arlin Davis wrote:

> Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
>
> Index: dapl/openib/dapl_ib_dto.h
> ===================================================================
> --- dapl/openib/dapl_ib_dto.h   (revision 2720)
> +++ dapl/openib/dapl_ib_dto.h   (working copy)
> @@ -88,7 +88,7 @@
>       total_len = 0;
>       wr.next = 0;
>       wr.num_sge = 0;
> -       wr.wr_id = (uint64_t)cookie;
> +       wr.wr_id = (uint64_t)(unsigned long)cookie;

           wr.wr_id = (uint64_t)(uintptr_t)cookie;

>       wr.sg_list = ds_array_p;
>
>       for (i = 0; i < segments; i++ ) {
> @@ -162,7 +162,7 @@
>       wr.opcode = op_type;
>       wr.num_sge = 0;
>       wr.send_flags = 0;
> -       wr.wr_id = (uint64_t)cookie;
> +       wr.wr_id = (uint64_t)(unsigned long)cookie;

           wr.wr_id = (uint64_t)(uintptr_t)cookie;

>       wr.sg_list = ds_array_p;
>       total_len = 0;
>



More information about the general mailing list