[ofw] [PATCH v2] Remove VOID_PTR64

Leonid Keller leonid at mellanox.co.il
Sun Jul 13 03:28:41 PDT 2008


Applied in 1380. Thank you.
 

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Fab Tillier
> Sent: Friday, July 11, 2008 10:46 PM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH v2] Remove VOID_PTR64
> 
> Updated since the FUNC_PTR64 patch changed things.  Also 
> fixed GPL license and missing copyright issues.
> 
> Signed-off-by: Fab Tillier <ftillier at microsoft.com>
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\kernel\al_proxy.c trunk\core\al\kernel\al_proxy.c
> --- old\core\al\kernel\al_proxy.c       Fri Jul 11 12:20:50 2008
> +++ trunk\core\al\kernel\al_proxy.c     Fri Jul 11 12:41:44 2008
> @@ -776,7 +776,7 @@ __proxy_pnp_cb(
>                 break;
>         }
> 
> -       p_evt_rec->pnp.h_pnp = (ib_pnp_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_pnp_rec->h_pnp->obj.hdl);
> +       p_evt_rec->pnp.h_pnp = 
> + (ib_pnp_handle_t)HDL_TO_PTR(p_pnp_rec->h_pnp->obj.hdl);
>         p_pnp_rec->h_pnp->obj.hdl_valid = TRUE;
> 
>         hdl =
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\kernel\al_proxy_ndi.c trunk\core\al\kernel\al_proxy_ndi.c
> --- old\core\al\kernel\al_proxy_ndi.c   Fri Jul 11 12:41:22 2008
> +++ trunk\core\al\kernel\al_proxy_ndi.c Fri Jul 11 12:41:44 2008
> @@ -387,7 +387,7 @@ __ndi_rep_cm(
>         }
> 
>         /* Get and validate QP handle */
> -       h_qp = (ib_qp_handle_t VOID_PTR64)al_hdl_ref( 
> p_context->h_al, p_rep->h_qp, AL_OBJ_TYPE_H_QP );
> +       h_qp = (ib_qp_handle_t)al_hdl_ref( p_context->h_al, 
> p_rep->h_qp, 
> + AL_OBJ_TYPE_H_QP );
>         if( !h_qp )
>         {
>                 cl_status = CL_INVALID_HANDLE; diff -up -r -X 
> trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\kernel\al_proxy_subnet.c 
> trunk\core\al\kernel\al_proxy_subnet.c
> --- old\core\al\kernel\al_proxy_subnet.c        Fri Jul 11 
> 12:20:50 2008
> +++ trunk\core\al\kernel\al_proxy_subnet.c      Fri Jul 11 
> 12:41:45 2008
> @@ -697,7 +697,7 @@ __proxy_mad_recv_cb(
>         
> cb_info.ioctl_rec.mad_recv_cb_ioctl_rec.mad_svc_context = 
> mad_svc_context;
>         cb_info.ioctl_rec.mad_recv_cb_ioctl_rec.elem_size = 
> p_mad_element->size;
>         cb_info.ioctl_rec.mad_recv_cb_ioctl_rec.p_send_mad =
> -               (ib_mad_element_t* 
> VOID_PTR64)p_mad_element->send_context1;
> +               (ib_mad_element_t*)p_mad_element->send_context1;
> 
>         /*
>          * If we're already closing the device - do not queue 
> a callback, since diff -up -r -X trunk\docs\dontdiff.txt -I 
> \$Id: old\core\al\kernel\al_proxy_verbs.c 
> trunk\core\al\kernel\al_proxy_verbs.c
> --- old\core\al\kernel\al_proxy_verbs.c Fri Jul 11 12:20:50 2008
> +++ trunk\core\al\kernel\al_proxy_verbs.c       Fri Jul 11 
> 12:41:45 2008
> @@ -347,7 +347,7 @@ proxy_ca_err_cb(
>         cb_info.rec_type = CA_ERROR_REC;
>         /* Return the Proxy's open_ca handle and the user's context */
>         cb_info.ioctl_rec.event_rec = *p_err_rec;
> -       cb_info.ioctl_rec.event_rec.handle.h_ca = 
> (ib_ca_handle_t VOID_PTR64)HDL_TO_PTR(h_ca->obj.hdl);
> +       cb_info.ioctl_rec.event_rec.handle.h_ca = 
> + (ib_ca_handle_t)HDL_TO_PTR(h_ca->obj.hdl);
> 
>         /* The proxy handle must be valid now. */
>         if( !h_ca->obj.hdl_valid )
> @@ -982,7 +982,7 @@ proxy_srq_err_cb(
>         cb_info.rec_type = SRQ_ERROR_REC;
>         /* Return the Proxy's SRQ handle and the user's context */
>         cb_info.ioctl_rec.event_rec = *p_err_rec;
> -       cb_info.ioctl_rec.event_rec.handle.h_srq = 
> (ib_srq_handle_t VOID_PTR64) HDL_TO_PTR(h_srq->obj.hdl);
> +       cb_info.ioctl_rec.event_rec.handle.h_srq = (ib_srq_handle_t) 
> + HDL_TO_PTR(h_srq->obj.hdl);
> 
>         /* The proxy handle must be valid now. */
>         if( !h_srq->obj.hdl_valid )
> @@ -1286,7 +1286,7 @@ proxy_qp_err_cb(
>         cb_info.rec_type = QP_ERROR_REC;
>         /* Return the Proxy's QP handle and the user's context */
>         cb_info.ioctl_rec.event_rec = *p_err_rec;
> -       cb_info.ioctl_rec.event_rec.handle.h_qp = 
> (ib_qp_handle_t VOID_PTR64)HDL_TO_PTR(h_qp->obj.hdl);
> +       cb_info.ioctl_rec.event_rec.handle.h_qp = 
> + (ib_qp_handle_t)HDL_TO_PTR(h_qp->obj.hdl);
> 
>         /* The proxy handle must be valid now. */
>         if( !h_qp->obj.hdl_valid )
> @@ -1337,14 +1337,14 @@ proxy_create_qp(
>         }
> 
>         /* Validate handles. */
> -       h_pd = (ib_pd_handle_t VOID_PTR64)
> +       h_pd = (ib_pd_handle_t)
>                 al_hdl_ref( p_context->h_al, 
> p_ioctl->in.h_pd, AL_OBJ_TYPE_H_PD );
> -       h_sq_cq = (ib_cq_handle_t VOID_PTR64)al_hdl_ref( 
> p_context->h_al,
> +       h_sq_cq = (ib_cq_handle_t)al_hdl_ref( p_context->h_al,
>                 (uint64_t)p_ioctl->in.qp_create.h_sq_cq, 
> AL_OBJ_TYPE_H_CQ );
> -       h_rq_cq = (ib_cq_handle_t VOID_PTR64)al_hdl_ref( 
> p_context->h_al,
> +       h_rq_cq = (ib_cq_handle_t)al_hdl_ref( p_context->h_al,
>                 (uint64_t)p_ioctl->in.qp_create.h_rq_cq, 
> AL_OBJ_TYPE_H_CQ );
>         if (p_ioctl->in.qp_create.h_srq) {
> -               h_srq = (ib_srq_handle_t 
> VOID_PTR64)al_hdl_ref( p_context->h_al,
> +               h_srq = (ib_srq_handle_t)al_hdl_ref( p_context->h_al,
>                         
> (uint64_t)p_ioctl->in.qp_create.h_srq, AL_OBJ_TYPE_H_SRQ );
>                 if( !h_srq)
>                 {
> @@ -1486,25 +1486,25 @@ proxy_query_qp(
>                 if( p_ioctl->out.attr.h_pd )
>                 {
>                         p_ioctl->out.attr.h_pd =
> -                               (ib_pd_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_pd->obj.hdl);
> +                               
> + (ib_pd_handle_t)HDL_TO_PTR(p_ioctl->out.attr.h_pd->obj.hdl);
>                 }
> 
>                 if( p_ioctl->out.attr.h_sq_cq )
>                 {
>                         p_ioctl->out.attr.h_sq_cq =
> -                               (ib_cq_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_sq_cq->obj.hdl);
> +                               
> + (ib_cq_handle_t)HDL_TO_PTR(p_ioctl->out.attr.h_sq_cq->obj.hdl);
>                 }
> 
>                 if( p_ioctl->out.attr.h_rq_cq )
>                 {
>                         p_ioctl->out.attr.h_rq_cq =
> -                               (ib_cq_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_rq_cq->obj.hdl);
> +                               
> + (ib_cq_handle_t)HDL_TO_PTR(p_ioctl->out.attr.h_rq_cq->obj.hdl);
>                 }
> 
>                 if( p_ioctl->out.attr.h_srq )
>                 {
>                         p_ioctl->out.attr.h_srq =
> -                               (ib_srq_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_srq->obj.hdl);
> +                               
> + (ib_srq_handle_t)HDL_TO_PTR(p_ioctl->out.attr.h_srq->obj.hdl);
>                 }
>         }
>         else
> @@ -2045,7 +2045,7 @@ proxy_cq_err_cb(
>         cb_info.rec_type = CQ_ERROR_REC;
>         /* Return the Proxy's cq handle and the user's context */
>         cb_info.ioctl_rec.event_rec = *p_err_rec;
> -       cb_info.ioctl_rec.event_rec.handle.h_cq = 
> (ib_cq_handle_t VOID_PTR64)HDL_TO_PTR(h_cq->obj.hdl);
> +       cb_info.ioctl_rec.event_rec.handle.h_cq = 
> + (ib_cq_handle_t)HDL_TO_PTR(h_cq->obj.hdl);
> 
>         /* The proxy handle must be valid now. */
>         if( !h_cq->obj.hdl_valid )
> @@ -2358,7 +2358,7 @@ proxy_post_send(
>                 if( h_qp->type == IB_QPT_UNRELIABLE_DGRM )
>                 {
>                         /* Validate the AV handle for UD */
> -                       h_av = (ib_av_handle_t 
> VOID_PTR64)al_hdl_ref( p_context->h_al,
> +                       h_av = (ib_av_handle_t)al_hdl_ref( 
> + p_context->h_al,
>                                 
> (uint64_t)p_wr[i].dgrm.ud.h_av, AL_OBJ_TYPE_H_AV );
>                         if( !h_av )
>                         {
> @@ -3041,7 +3041,7 @@ proxy_query_mr(
>         {
>                 /* Replace the pd handle with proxy's handle */
>                 p_ioctl->out.attr.h_pd =
> -                       (ib_pd_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_pd->obj.hdl);
> +                       
> + (ib_pd_handle_t)HDL_TO_PTR(p_ioctl->out.attr.h_pd->obj.hdl);
>         }
>         else
>         {
> @@ -3492,7 +3492,7 @@ proxy_bind_mw(
>         }
> 
>         /* Validate MR handle */
> -       h_mr = (ib_mr_handle_t VOID_PTR64)al_hdl_ref( p_context->h_al,
> +       h_mr = (ib_mr_handle_t)al_hdl_ref( p_context->h_al,
>                 (uint64_t)p_ioctl->in.mw_bind.h_mr, 
> AL_OBJ_TYPE_H_MR );
>         if( !h_mr )
>         {
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\user\ual_cm_cep.c trunk\core\al\user\ual_cm_cep.c
> --- old\core\al\user\ual_cm_cep.c       Fri Jul 11 12:41:22 2008
> +++ trunk\core\al\user\ual_cm_cep.c     Fri Jul 11 12:41:45 2008
> @@ -522,7 +522,7 @@ al_cep_pre_req(
>      cl_memclr(&ioctl, sizeof(ioctl));
>         ioctl.in.cid = cid;
>         ioctl.in.cm_req = *p_cm_req;
> -       ioctl.in.cm_req.h_qp = (ib_qp_handle_t VOID_PTR64) 
> HDL_TO_PTR(p_cm_req->h_qp->obj.hdl);
> +       ioctl.in.cm_req.h_qp = (ib_qp_handle_t) 
> + HDL_TO_PTR(p_cm_req->h_qp->obj.hdl);
>         ioctl.in.paths[0] = *(p_cm_req->p_primary_path);
>         if( p_cm_req->p_alt_path )
>                 ioctl.in.paths[1] = *(p_cm_req->p_alt_path); 
> @@ -651,7 +651,7 @@ al_cep_pre_rep(
>         ioctl.in.context = context;
>         ioctl.in.cid = cid;
>         ioctl.in.cm_rep = *p_cm_rep;
> -       ioctl.in.cm_rep.h_qp = (ib_qp_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_cm_rep->h_qp->obj.hdl);
> +       ioctl.in.cm_rep.h_qp = 
> + (ib_qp_handle_t)HDL_TO_PTR(p_cm_rep->h_qp->obj.hdl);
>         /* Copy private data, if any. */
>         if( p_cm_rep->p_rep_pdata )
>         {
> @@ -1010,7 +1010,7 @@ al_cep_lap(
>      cl_memclr(&ioctl,sizeof (ioctl));
>         ioctl.cid = cid;
>         ioctl.cm_lap = *p_cm_lap;
> -       ioctl.cm_lap.h_qp = (ib_qp_handle_t VOID_PTR64) 
> HDL_TO_PTR(p_cm_lap->h_qp->obj.hdl);
> +       ioctl.cm_lap.h_qp = (ib_qp_handle_t) 
> + HDL_TO_PTR(p_cm_lap->h_qp->obj.hdl);
>         ioctl.alt_path = *(p_cm_lap->p_alt_path);
>         /* Copy private data, if any. */
>         if( p_cm_lap->p_lap_pdata )
> @@ -1066,7 +1066,7 @@ al_cep_pre_apr(
>      cl_memclr(&ioctl, sizeof (ioctl));
>         ioctl.in.cid = cid;
>         ioctl.in.cm_apr = *p_cm_apr;
> -       ioctl.in.cm_apr.h_qp = (ib_qp_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_cm_apr->h_qp->obj.hdl);
> +       ioctl.in.cm_apr.h_qp = 
> + (ib_qp_handle_t)HDL_TO_PTR(p_cm_apr->h_qp->obj.hdl);
>         if( p_cm_apr->p_info )
>         {
>                 if( p_cm_apr->info_length > IB_APR_INFO_SIZE 
> ) diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\user\ual_mcast.c trunk\core\al\user\ual_mcast.c
> --- old\core\al\user\ual_mcast.c        Fri Jul 11 12:20:50 2008
> +++ trunk\core\al\user\ual_mcast.c      Fri Jul 11 12:41:45 2008
> @@ -99,7 +99,7 @@ ual_attach_mcast(
>                 status = ioctl_buf.out.status;
>                 if( status == IB_SUCCESS ){
>                         h_mcast->obj.hdl = ioctl_buf.out.h_attach;
> -                       h_mcast->h_ci_mcast = 
> (ib_mcast_handle_t VOID_PTR64) HDL_TO_PTR(ioctl_buf.out.h_attach);
> +                       h_mcast->h_ci_mcast = (ib_mcast_handle_t) 
> + HDL_TO_PTR(ioctl_buf.out.h_attach);
>                 }
>         }
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\user\ual_mgr.c trunk\core\al\user\ual_mgr.c
> --- old\core\al\user\ual_mgr.c  Fri Jul 11 12:20:50 2008
> +++ trunk\core\al\user\ual_mgr.c        Fri Jul 11 12:41:45 2008
> @@ -646,7 +646,7 @@ __process_misc_cb(
>                 /* We got a send completion. */
>                 ib_mad_element_t                        *p_element;
> 
> -               ib_mad_svc_handle_t VOID_PTR64                
>   h_mad_svc = (ib_mad_svc_handle_t VOID_PTR64)
> +               ib_mad_svc_handle_t                     
> h_mad_svc = (ib_mad_svc_handle_t)
>                         
> p_misc_cb_info->ioctl_rec.mad_send_cb_ioctl_rec.mad_svc_context;
> 
>                 /* Copy the data to the user's element. */ @@ 
> -682,7 +682,7 @@ __process_misc_cb(
>                 ib_mad_t                                
> *p_mad_buf = NULL;
>                 ib_grh_t                                *p_grh = NULL;
> 
> -               h_mad_svc = (ib_mad_svc_handle_t VOID_PTR64)
> +               h_mad_svc = (ib_mad_svc_handle_t)
>                         
> p_misc_cb_info->ioctl_rec.mad_recv_cb_ioctl_rec.mad_svc_context;
> 
>                 p_send_mad =
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\user\ual_mw.c trunk\core\al\user\ual_mw.c
> --- old\core\al\user\ual_mw.c   Fri Jul 11 12:20:50 2008
> +++ trunk\core\al\user\ual_mw.c Fri Jul 11 12:41:45 2008
> @@ -280,7 +280,7 @@ ual_bind_mw(
>         mw_ioctl.in.h_mw = h_mw->obj.hdl;
>         mw_ioctl.in.h_qp = h_qp->obj.hdl;
>         mw_ioctl.in.mw_bind = *p_mw_bind;
> -       mw_ioctl.in.mw_bind.h_mr = (ib_mr_handle_t 
> VOID_PTR64) HDL_TO_PTR(p_mw_bind->h_mr->obj.hdl);
> +       mw_ioctl.in.mw_bind.h_mr = (ib_mr_handle_t) 
> + HDL_TO_PTR(p_mw_bind->h_mr->obj.hdl);
> 
>         cl_status = do_al_dev_ioctl( UAL_BIND_MW,
>                 &mw_ioctl.in, sizeof(mw_ioctl.in), 
> &mw_ioctl.out, sizeof(mw_ioctl.out), diff -up -r -X 
> trunk\docs\dontdiff.txt -I \$Id: old\core\al\user\ual_qp.c 
> trunk\core\al\user\ual_qp.c
> --- old\core\al\user\ual_qp.c   Fri Jul 11 12:20:50 2008
> +++ trunk\core\al\user\ual_qp.c Fri Jul 11 12:41:45 2008
> @@ -314,12 +314,12 @@ ual_create_qp(
>         qp_ioctl.in.h_pd = h_pd->obj.hdl;
>         qp_ioctl.in.qp_create = *p_qp_create;
>         qp_ioctl.in.qp_create.h_rq_cq =
> -               (ib_cq_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_qp_create->h_rq_cq->obj.hdl);
> +               
> + (ib_cq_handle_t)HDL_TO_PTR(p_qp_create->h_rq_cq->obj.hdl);
>         qp_ioctl.in.qp_create.h_sq_cq =
> -               (ib_cq_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_qp_create->h_sq_cq->obj.hdl);
> +               
> + (ib_cq_handle_t)HDL_TO_PTR(p_qp_create->h_sq_cq->obj.hdl);
>         if (p_qp_create->h_srq)
>                 qp_ioctl.in.qp_create.h_srq =
> -                       (ib_srq_handle_t 
> VOID_PTR64)HDL_TO_PTR(p_qp_create->h_srq->obj.hdl);
> +                       
> + (ib_srq_handle_t)HDL_TO_PTR(p_qp_create->h_srq->obj.hdl);
>         qp_ioctl.in.context = h_qp;
>         qp_ioctl.in.ev_notify = (h_qp->pfn_event_cb != NULL) 
> ? TRUE : FALSE;
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mlx4\kernel\hca\ca.c trunk\hw\mlx4\kernel\hca\ca.c
> --- old\hw\mlx4\kernel\hca\ca.c Fri Jul 11 12:20:50 2008
> +++ trunk\hw\mlx4\kernel\hca\ca.c       Fri Jul 11 12:41:45 2008
> @@ -252,7 +252,7 @@ mlnx_query_ca (
> 
>                 // get gids, using cache
>                 for (i=0; i < hca_ports[port_num].gid_tbl_len; ++i) {
> -                       union ib_gid * VOID_PTR64  gid = 
> (union ib_gid     *)&p_ca_attr->p_port_attr[port_num].p_gid_table[i];
> +                       union ib_gid * gid = (union ib_gid 
> + *)&p_ca_attr->p_port_attr[port_num].p_gid_table[i];
>                         err = p_ibdev->x.get_cached_gid( 
> p_ibdev, (u8)(port_num + start_port(p_ibdev)), i, (union 
> ib_gid *)gid );
>                         //TODO: do we need to convert gids to 
> little endian
>                         if (err) {
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mlx4\user\hca\verbs.c trunk\hw\mlx4\user\hca\verbs.c
> --- old\hw\mlx4\user\hca\verbs.c        Fri Jul 11 12:20:50 2008
> +++ trunk\hw\mlx4\user\hca\verbs.c      Fri Jul 11 12:41:45 2008
> @@ -157,19 +157,19 @@ __fixup_ca_attr(
> 
>         /* Fix up the pointers to point within the 
> destination buffer. */
>         p_dest->p_page_size =
> -               (uint32_t* VOID_PTR64)(((uint8_t* 
> VOID_PTR64)p_dest->p_page_size) + offset);
> +               (uint32_t*)(((uint8_t*)p_dest->p_page_size) + offset);
> 
>         p_tmp_port_attr =
> -               (ib_port_attr_t* VOID_PTR64)(((uint8_t* 
> VOID_PTR64)p_dest->p_port_attr) + offset);
> +               (ib_port_attr_t*)(((uint8_t*)p_dest->p_port_attr) + 
> + offset);
> 
>         /* Fix up each port attribute's gid and pkey table 
> pointers. */
>         for( i = 0; i < p_dest->num_ports; i++ )
>         {
> -               p_tmp_port_attr[i].p_gid_table = (ib_gid_t* 
> VOID_PTR64)
> -                       (((uint8_t* 
> VOID_PTR64)p_tmp_port_attr[i].p_gid_table) + offset);
> +               p_tmp_port_attr[i].p_gid_table = (ib_gid_t*)
> +                       (((uint8_t*)p_tmp_port_attr[i].p_gid_table) + 
> + offset);
> 
> -               p_tmp_port_attr[i].p_pkey_table =(ib_net16_t* 
> VOID_PTR64)
> -                       (((uint8_t* 
> VOID_PTR64)p_tmp_port_attr[i].p_pkey_table) + offset);
> +               p_tmp_port_attr[i].p_pkey_table =(ib_net16_t*)
> +                       
> (((uint8_t*)p_tmp_port_attr[i].p_pkey_table) + 
> + offset);
>         }
>         p_dest->p_port_attr = p_tmp_port_attr;  } diff -up -r 
> -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\kernel\hca_data.h trunk\hw\mthca\kernel\hca_data.h
> --- old\hw\mthca\kernel\hca_data.h      Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\kernel\hca_data.h    Fri Jul 11 12:41:45 2008
> @@ -220,7 +220,7 @@ typedef struct _mlnx_hca_t {
> 
>  #ifdef WIN_TO_BE_REMOVED
>         // removed as it is found in p_ext->cl_ext.p_pdo
> -       const void* VOID_PTR64  p_dev_obj;              // Driver PDO
> +       const void*     p_dev_obj;              // Driver PDO
>  #endif
>  } mlnx_hca_t;
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\kernel\hca_mcast.c trunk\hw\mthca\kernel\hca_mcast.c
> --- old\hw\mthca\kernel\hca_mcast.c     Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\kernel\hca_mcast.c   Fri Jul 11 12:41:45 2008
> @@ -114,7 +114,7 @@ mlnx_attach_mcast (
>                 cl_ntoh64(*(uint64_t*)&mcast_p->mcast_gid.raw[8] )));
> 
>         // return the result
> -       if (ph_mcast) *ph_mcast = (ib_mcast_handle_t 
> VOID_PTR64)mcast_p;
> +       if (ph_mcast) *ph_mcast = (ib_mcast_handle_t)mcast_p;
> 
>         status = IB_SUCCESS;
>         goto end;
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\kernel\hca_memory.c trunk\hw\mthca\kernel\hca_memory.c
> --- old\hw\mthca\kernel\hca_memory.c    Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\kernel\hca_memory.c  Fri Jul 11 12:41:45 2008
> @@ -101,7 +101,7 @@ mlnx_register_mr (
>         // results
>         *p_lkey = mr_p->lkey;
>         *p_rkey = cl_hton32( mr_p->rkey );
> -       if (ph_mr)      *ph_mr = (ib_mr_handle_t VOID_PTR64)mr_p;
> +       if (ph_mr)      *ph_mr = (ib_mr_handle_t)mr_p;
>         status = IB_SUCCESS;
> 
>  err_reg_mr:
> @@ -184,7 +184,7 @@ mlnx_register_pmr (
> 
>         // results
>  done:
> -       if (ph_mr)      *ph_mr = (ib_mr_handle_t VOID_PTR64)mr_p;
> +       if (ph_mr)      *ph_mr = (ib_mr_handle_t)mr_p;
>         *p_lkey = mr_p->lkey;
>         *p_rkey = cl_hton32( mr_p->rkey );
>         //NB:  p_vaddr was not changed
> @@ -375,7 +375,7 @@ mlnx_alloc_fmr(
>         }
> 
>         // results
> -       if (ph_fmr)     *ph_fmr = (mlnx_fmr_handle_t VOID_PTR64)fmr_p;
> +       if (ph_fmr)     *ph_fmr = (mlnx_fmr_handle_t)fmr_p;
>         status = IB_SUCCESS;
> 
>  err_alloc_fmr:
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\kernel\hca_verbs.c trunk\hw\mthca\kernel\hca_verbs.c
> --- old\hw\mthca\kernel\hca_verbs.c     Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\kernel\hca_verbs.c   Fri Jul 11 12:41:45 2008
> @@ -260,7 +260,7 @@ mlnx_query_ca (
> 
>                 // get gids, using cache
>                 for (i=0; i < hca_ports[port_num].gid_tbl_len; ++i) {
> -                       union ib_gid * VOID_PTR64  gid = 
> (union ib_gid     *)&p_ca_attr->p_port_attr[port_num].p_gid_table[i];
> +                       union ib_gid * gid = (union ib_gid 
> + *)&p_ca_attr->p_port_attr[port_num].p_gid_table[i];
>                         err = ib_get_cached_gid( ib_dev, 
> port_num + start_port(ib_dev), i, (union ib_gid *)gid );
>                         //TODO: do we need to convert gids to 
> little endian
>                         if (err) {
> @@ -486,7 +486,7 @@ done:
>         cl_spinlock_release( &ext_p->uctx_lock );
> 
>         // return the result
> -       if (ph_um_ca) *ph_um_ca = (ib_ca_handle_t 
> VOID_PTR64)p_context;
> +       if (ph_um_ca) *ph_um_ca = (ib_ca_handle_t)p_context;
> 
>         status = IB_SUCCESS;
>         goto end;
> @@ -575,7 +575,7 @@ mlnx_allocate_pd (
>         }
> 
>         // return the result
> -       if (ph_pd) *ph_pd = (ib_pd_handle_t VOID_PTR64)ib_pd_p;
> +       if (ph_pd) *ph_pd = (ib_pd_handle_t)ib_pd_p;
> 
>         status = IB_SUCCESS;
> 
> @@ -672,7 +672,7 @@ mlnx_create_av (
>         }
> 
>         // return the result
> -       if (ph_av) *ph_av = (ib_av_handle_t VOID_PTR64)ib_av_p;
> +       if (ph_av) *ph_av = (ib_av_handle_t)ib_av_p;
> 
>         status = IB_SUCCESS;
> 
> @@ -735,7 +735,7 @@ mlnx_query_av (
>  #endif
> 
>         // results
> -       *ph_pd = (ib_pd_handle_t VOID_PTR64)ib_ah_p->pd;
> +       *ph_pd = (ib_pd_handle_t)ib_ah_p->pd;
> 
>  err_conv_mthca_av:
>  err_user_unsupported:
> @@ -885,7 +885,7 @@ mlnx_create_srq (
>         srq_p->srq_context = (void*)srq_context;
> 
>         // return the result
> -       if (ph_srq) *ph_srq = (ib_srq_handle_t VOID_PTR64)srq_p;
> +       if (ph_srq) *ph_srq = (ib_srq_handle_t)srq_p;
> 
>         status = IB_SUCCESS;
> 
> @@ -1065,13 +1065,13 @@ _create_qp (
> 
>         // Query QP to obtain requested attributes
>         if (p_qp_attr) {
> -               status = mlnx_query_qp ((ib_qp_handle_t 
> VOID_PTR64)ib_qp_p, p_qp_attr, p_umv_buf);
> +               status = mlnx_query_qp ((ib_qp_handle_t)ib_qp_p, 
> + p_qp_attr, p_umv_buf);
>                 if (status != IB_SUCCESS)
>                                 goto err_query_qp;
>         }
> 
>         // return the results
> -       if (ph_qp) *ph_qp = (ib_qp_handle_t VOID_PTR64)ib_qp_p;
> +       if (ph_qp) *ph_qp = (ib_qp_handle_t)ib_qp_p;
> 
>         status = IB_SUCCESS;
>         goto end;
> @@ -1195,7 +1195,7 @@ mlnx_modify_qp (
>         // Query QP to obtain requested attributes
>  query_qp:
>         if (p_qp_attr) {
> -               status = mlnx_query_qp ((ib_qp_handle_t 
> VOID_PTR64)ib_qp_p, p_qp_attr, p_umv_buf);
> +               status = mlnx_query_qp ((ib_qp_handle_t)ib_qp_p, 
> + p_qp_attr, p_umv_buf);
>                 if (status != IB_SUCCESS)
>                                 goto err_query_qp;
>         }
> @@ -1282,7 +1282,7 @@ mlnx_query_qp (
> 
>         // fill the structure
>         //TODO: this function is to be implemented via 
> ibv_query_qp, which is not supported now
> -       p_qp_attr->h_pd                                       
>   = (ib_pd_handle_t VOID_PTR64)qp_p->ibqp.pd;
> +       p_qp_attr->h_pd                                       
>   = (ib_pd_handle_t)qp_p->ibqp.pd;
>         p_qp_attr->qp_type                              = 
> qp_p->ibqp.qp_type;
>         p_qp_attr->sq_max_inline                = 
> qp_p->qp_init_attr.cap.max_inline_data;
>         p_qp_attr->sq_depth                             = 
> qp_p->qp_init_attr.cap.max_send_wr;
> @@ -1290,8 +1290,8 @@ mlnx_query_qp (
>         p_qp_attr->sq_sge                                     
>   = qp_p->qp_init_attr.cap.max_send_sge;
>         p_qp_attr->rq_sge                                     
>   = qp_p->qp_init_attr.cap.max_recv_sge;
>         p_qp_attr->resp_res                             = 
> qp_p->resp_depth;
> -       p_qp_attr->h_sq_cq                              = 
> (ib_cq_handle_t VOID_PTR64)qp_p->ibqp.send_cq;
> -       p_qp_attr->h_rq_cq                              = 
> (ib_cq_handle_t VOID_PTR64)qp_p->ibqp.recv_cq;
> +       p_qp_attr->h_sq_cq                              = 
> (ib_cq_handle_t)qp_p->ibqp.send_cq;
> +       p_qp_attr->h_rq_cq                              = 
> (ib_cq_handle_t)qp_p->ibqp.recv_cq;
>         p_qp_attr->sq_signaled                  = 
> qp_p->sq_policy == IB_SIGNAL_ALL_WR;
>         p_qp_attr->state                                      
>           = mlnx_qps_to_ibal( qp_p->state );
>         p_qp_attr->num                                        
>   = cl_hton32(qp_p->ibqp.qp_num);
> @@ -1422,7 +1422,7 @@ mlnx_create_cq (
>  //     *p_size = *p_size;      // return the same value
>         *p_size = ib_cq_p->cqe;
> 
> -       if (ph_cq) *ph_cq = (ib_cq_handle_t VOID_PTR64)cq_p;
> +       if (ph_cq) *ph_cq = (ib_cq_handle_t)cq_p;
> 
>         status = IB_SUCCESS;
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\kernel\mthca_mad.c trunk\hw\mthca\kernel\mthca_mad.c
> --- old\hw\mthca\kernel\mthca_mad.c     Fri Jul 11 12:20:50 2008
> +++ trunk\hw\mthca\kernel\mthca_mad.c   Fri Jul 11 12:42:38 2008
> @@ -2,12 +2,10 @@
>   * Copyright (c) 2004 Topspin Communications.  All rights reserved.
>   * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
>   * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
> + * Portions Copyright (c) 2008 Microsoft Corporation.  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
> - * General Public License (GPL) Version 2, available from the file
> - * COPYING in the main directory of this source tree, or the
> - * OpenIB.org BSD license below:
> + * This software is available to you under the OpenIB.org BSD license
> + * below:
>   *
>   *     Redistribution and use in source and binary forms, with or
>   *     without modification, are permitted provided that the 
> following
> @@ -130,7 +128,7 @@ static void forward_trap(struct mthca_de
>         SPIN_LOCK_PREP(lh);
> 
>         /* fill the template */
> -       wr.ds_array = (ib_local_ds_t* VOID_PTR64)(void*)&gather_list;
> +       wr.ds_array = (ib_local_ds_t*)(void*)&gather_list;
>         wr.num_ds = 1;
>         wr.wr_type = WR_SEND;
>         wr.send_opt = IB_SEND_OPT_SIGNALED; @@ -150,7 +148,7 
> @@ static void forward_trap(struct mthca_de
> 
>                 memcpy(tmad->sg.page, mad, sizeof *mad);
> 
> -               wr.dgrm.ud.rsvd = (void* VOID_PTR64)&((struct 
> ib_mad *)tmad->sg.page)->mad_hdr;
> +               wr.dgrm.ud.rsvd = (void*)&((struct ib_mad 
> + *)tmad->sg.page)->mad_hdr;
>                 wr.wr_id         = (u64)(ULONG_PTR)tmad;
>                 gather_list.addr   = tmad->sg.dma_address;
>                 gather_list.length = tmad->sg.length; @@ 
> -163,7 +161,7 @@ static void forward_trap(struct mthca_de
>                  * it's OK for our devices).
>                  */
>                 spin_lock_irqsave(&dev->sm_lock, &lh);
> -               wr.dgrm.ud.h_av = (ib_av_handle_t 
> VOID_PTR64)dev->sm_ah[port_num - 1];
> +               wr.dgrm.ud.h_av = 
> (ib_av_handle_t)dev->sm_ah[port_num - 
> + 1];
>                 if (wr.dgrm.ud.h_av) {
>                                 HCA_PRINT( TRACE_LEVEL_ERROR 
> ,HCA_DBG_MAD ,(" ib_post_send_mad not ported \n" ));
>                                 ret = -EINVAL; diff -up -r -X 
> trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\user\mlnx_ual_av.c trunk\hw\mthca\user\mlnx_ual_av.c
> --- old\hw\mthca\user\mlnx_ual_av.c     Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\user\mlnx_ual_av.c   Fri Jul 11 12:41:45 2008
> @@ -244,7 +244,7 @@ __post_create_av (
>                         }
>                         ah->key  = page->mr.lkey;
>                 }
> -               *ph_uvp_av = (ib_av_handle_t VOID_PTR64)ah;
> +               *ph_uvp_av = (ib_av_handle_t)ah;
>         }
>         else {
>                 mthca_free_av(ah);
> @@ -290,7 +290,7 @@ __post_query_av (
>         {
>                 cl_memcpy (p_addr_vector, &ah->av_attr, 
> sizeof (ib_av_attr_t));
>                 if (ph_pd)
> -                       *ph_pd = (ib_pd_handle_t 
> VOID_PTR64)ah->h_uvp_pd;
> +                       *ph_pd = (ib_pd_handle_t)ah->h_uvp_pd;
>         }
> 
>         UVP_EXIT(UVP_DBG_AV);
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\user\mlnx_ual_ca.c trunk\hw\mthca\user\mlnx_ual_ca.c
> --- old\hw\mthca\user\mlnx_ual_ca.c     Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\user\mlnx_ual_ca.c   Fri Jul 11 12:41:45 2008
> @@ -111,7 +111,7 @@ __post_open_ca (
>                 /* return results */
>                 new_ca->ibv_ctx = ibvcontext;
>                 new_ca->p_hca_attr = NULL;
> -               *ph_uvp_ca = (ib_ca_handle_t VOID_PTR64)new_ca;
> +               *ph_uvp_ca = (ib_ca_handle_t)new_ca;
>         }
> 
>  err_memory:
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\user\mlnx_ual_cq.c trunk\hw\mthca\user\mlnx_ual_cq.c
> --- old\hw\mthca\user\mlnx_ual_cq.c     Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\user\mlnx_ual_cq.c   Fri Jul 11 12:41:45 2008
> @@ -129,7 +129,7 @@ __post_create_cq (
>                         goto err_create_cq;
>                 }
> 
> -               *ph_uvp_cq = (ib_cq_handle_t VOID_PTR64)ibv_cq;
> +               *ph_uvp_cq = (ib_cq_handle_t)ibv_cq;
>         }
>         goto end;
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\user\mlnx_ual_pd.c trunk\hw\mthca\user\mlnx_ual_pd.c
> --- old\hw\mthca\user\mlnx_ual_pd.c     Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\user\mlnx_ual_pd.c   Fri Jul 11 12:41:45 2008
> @@ -114,7 +114,7 @@ __post_allocate_pd (
>                 /* return results */
>                 p_new_pd->ibv_pd = ibv_pd;
>                 p_new_pd->p_hobul = p_hobul;
> -               *ph_uvp_pd = (ib_pd_handle_t VOID_PTR64)p_new_pd;
> +               *ph_uvp_pd = (ib_pd_handle_t)p_new_pd;
>         }
>         goto end;
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\user\mlnx_ual_qp.c trunk\hw\mthca\user\mlnx_ual_qp.c
> --- old\hw\mthca\user\mlnx_ual_qp.c     Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\user\mlnx_ual_qp.c   Fri Jul 11 12:41:45 2008
> @@ -180,7 +180,7 @@ __post_create_qp (
>                         goto err_create_cq;
>                 }
> 
> -               *ph_uvp_qp = (ib_qp_handle_t VOID_PTR64)ibv_qp;
> +               *ph_uvp_qp = (ib_qp_handle_t)ibv_qp;
>         }
>         goto end;
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\user\mlnx_ual_srq.c trunk\hw\mthca\user\mlnx_ual_srq.c
> --- old\hw\mthca\user\mlnx_ual_srq.c    Fri Jul 11 12:41:22 2008
> +++ trunk\hw\mthca\user\mlnx_ual_srq.c  Fri Jul 11 12:41:45 2008
> @@ -207,7 +207,7 @@ __post_create_srq (
>                 if (mthca_is_memfree(ibv_pd->context))
>                         mthca_set_db_qn(srq->db, 
> MTHCA_DB_TYPE_SRQ, srq->srqn);
> 
> -               *ph_uvp_srq = (ib_srq_handle_t VOID_PTR64)srq;
> +               *ph_uvp_srq = (ib_srq_handle_t)srq;
>         }
>         else
>                 __free_srq(srq);
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\inc\iba\ib_types.h trunk\inc\iba\ib_types.h
> --- old\inc\iba\ib_types.h      Fri Jul 11 12:41:22 2008
> +++ trunk\inc\iba\ib_types.h    Fri Jul 11 12:41:45 2008
> @@ -45,10 +45,6 @@
>  #define TYPEDEF_PTR64
>  #endif
> 
> -#ifndef VOID_PTR64
> -#define VOID_PTR64
> -#endif
> -
>  #ifndef STRUCT_PTR64
>  #define STRUCT_PTR64
>  #endif
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\ulp\ipoib\kernel\ipoib_driver.c 
> trunk\ulp\ipoib\kernel\ipoib_driver.c
> --- old\ulp\ipoib\kernel\ipoib_driver.c Fri Jul 11 12:20:50 2008
> +++ trunk\ulp\ipoib\kernel\ipoib_driver.c       Fri Jul 11 
> 12:42:41 2008
> @@ -1,6 +1,7 @@
>  /*
>   * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
>   * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.
> + * Portions Copyright (c) 2008 Microsoft Corporation.  All 
> rights reserved.
>   *
>   * This software is available to you under the OpenIB.org BSD license
>   * below:
> @@ -2542,7 +2543,7 @@ __ipoib_ats_reg_cb(
>         CL_ASSERT( p_reg_svc_rec );
>         CL_ASSERT( p_reg_svc_rec->svc_context );
> 
> -       p_reg = (ats_reg_t* VOID_PTR64)p_reg_svc_rec->svc_context;
> +       p_reg = (ats_reg_t*)p_reg_svc_rec->svc_context;
>         port_num = p_reg->p_adapter->guids.port_num;
> 
>         cl_obj_lock( &p_reg->p_adapter->obj );
> 



More information about the ofw mailing list