[ofw] [PATCH] Cleanup XXX_PTR64 macros from SRP
Fab Tillier
ftillier at windows.microsoft.com
Thu Jun 26 23:52:37 PDT 2008
This patch removes XXX_PTR64 and TO_ULONG_PTR macro use from SRP.
Signed-off-by: Fab Tillier <ftillier at microsoft.com>
Index: ulp/srp/kernel/srp_event.c
===================================================================
--- ulp/srp/kernel/srp_event.c (revision 1300)
+++ ulp/srp/kernel/srp_event.c (working copy)
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corp. All rights reserved.
*
* This software is available to you under the OpenIB.org BSD license
* below:
@@ -52,7 +53,7 @@
srp_async_event_handler_cb(
IN ib_async_event_rec_t *p_event_rec )
{
- srp_session_t *p_srp_session = (srp_session_t * VOID_PTR64)p_event_rec->context;
+ srp_session_t *p_srp_session = (srp_session_t *)p_event_rec->context;
SRP_ENTER( SRP_DBG_PNP );
Index: ulp/srp/kernel/srp_data_path.c
===================================================================
--- ulp/srp/kernel/srp_data_path.c (revision 1300)
+++ ulp/srp/kernel/srp_data_path.c (working copy)
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corp. All rights reserved.
*
* This software is available to you under the OpenIB.org BSD license
* below:
@@ -80,7 +81,7 @@
net32_t lkey;
net32_t rkey;
srp_session_t *p_srp_session;
- mlnx_fmr_pool_el_t VOID_PTR64 p_fmr_el;
+ mlnx_fmr_pool_el_t p_fmr_el;
SRP_ENTER( SRP_DBG_DATA );
@@ -334,7 +335,7 @@
*/
void
srp_send_completion_cb(
- IN const ib_cq_handle_t FUNC_PTR64 h_cq,
+ IN const ib_cq_handle_t h_cq,
IN void *p_context )
{
srp_session_t *p_srp_session = (srp_session_t *)p_context;
@@ -895,7 +896,7 @@
*/
void
srp_recv_completion_cb(
- IN const ib_cq_handle_t FUNC_PTR64 h_cq,
+ IN const ib_cq_handle_t h_cq,
IN void *p_context )
{
srp_session_t *p_srp_session = (srp_session_t *)p_context;
Index: ulp/srp/kernel/srp_hba.c
===================================================================
--- ulp/srp/kernel/srp_hba.c (revision 1300)
+++ ulp/srp/kernel/srp_hba.c (working copy)
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corp. All rights reserved.
*
* This software is available to you under the OpenIB.org BSD license
* below:
@@ -899,7 +900,7 @@
SRP_ENTER( SRP_DBG_PNP );
- p_hba = (srp_hba_t* VOID_PTR64)p_pnp_rec->pnp_context;
+ p_hba = (srp_hba_t*)p_pnp_rec->pnp_context;
p_ioc_rec = (ib_pnp_ioc_rec_t*)p_pnp_rec;
p_ioc_path = (ib_pnp_ioc_path_rec_t*)p_pnp_rec;
Index: ulp/srp/kernel/srp_data_path.h
===================================================================
--- ulp/srp/kernel/srp_data_path.h (revision 1300)
+++ ulp/srp/kernel/srp_data_path.h (working copy)
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corp. All rights reserved.
*
* This software is available to you under the OpenIB.org BSD license
* below:
@@ -54,12 +55,12 @@
void
srp_send_completion_cb(
- IN const ib_cq_handle_t FUNC_PTR64 h_cq,
+ IN const ib_cq_handle_t h_cq,
IN void *p_context );
void
srp_recv_completion_cb(
- IN const ib_cq_handle_t FUNC_PTR64 h_cq,
+ IN const ib_cq_handle_t h_cq,
IN void *p_context );
BOOLEAN
Index: ulp/srp/kernel/srp_hba.h
===================================================================
--- ulp/srp/kernel/srp_hba.h (revision 1300)
+++ ulp/srp/kernel/srp_hba.h (working copy)
@@ -62,8 +62,8 @@
/* The extension is needed for StorPort calls. */
struct _srp_ext *p_ext;
-TO_LONG_PTR( ib_al_handle_t , h_al) ;
-TO_LONG_PTR( ib_pnp_handle_t , h_pnp) ;
+ ib_al_handle_t h_al;
+ ib_pnp_handle_t h_pnp;
ib_al_ifc_t ifc;
ioc_ifc_data_t info;
Index: ulp/srp/kernel/srp_connection.c
===================================================================
--- ulp/srp/kernel/srp_connection.c (revision 1300)
+++ ulp/srp/kernel/srp_connection.c (working copy)
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corp. All rights reserved.
*
* This software is available to you under the OpenIB.org BSD license
* below:
@@ -286,7 +287,7 @@
__srp_cm_dreq_cb(
IN ib_cm_dreq_rec_t *p_cm_dreq_rec )
{
- srp_session_t *p_srp_session = (srp_session_t* VOID_PTR64)p_cm_dreq_rec->qp_context;
+ srp_session_t *p_srp_session = (srp_session_t*)p_cm_dreq_rec->qp_context;
srp_hba_t *p_hba = p_srp_session->p_hba;
SRP_ENTER( SRP_DBG_PNP );
@@ -336,9 +337,9 @@
__srp_cm_reply_cb(
IN ib_cm_rep_rec_t *p_cm_reply)
{
- srp_session_t *p_srp_session = (srp_session_t* VOID_PTR64)p_cm_reply->qp_context;
+ srp_session_t *p_srp_session = (srp_session_t*)p_cm_reply->qp_context;
srp_connection_t *p_connection;
- srp_login_rsp_t *p_srp_login_rsp = (srp_login_rsp_t* VOID_PTR64)p_cm_reply->p_rep_pdata;
+ srp_login_rsp_t *p_srp_login_rsp = (srp_login_rsp_t*)p_cm_reply->p_rep_pdata;
ib_api_status_t status;
union
{
@@ -531,9 +532,9 @@
__srp_cm_rej_cb(
IN ib_cm_rej_rec_t *p_cm_reject)
{
- srp_session_t *p_srp_session = (srp_session_t* VOID_PTR64)p_cm_reject->qp_context;
+ srp_session_t *p_srp_session = (srp_session_t*)p_cm_reject->qp_context;
srp_connection_t *p_connection;
- srp_login_rej_t *p_srp_login_rej = (srp_login_rej_t* VOID_PTR64)p_cm_reject->p_rej_pdata;
+ srp_login_rej_t *p_srp_login_rej = (srp_login_rej_t*)p_cm_reject->p_rej_pdata;
cl_status_t cl_status;
SRP_ENTER( SRP_DBG_PNP );
Index: ulp/srp/kernel/srp_hca.h
===================================================================
--- ulp/srp/kernel/srp_hca.h (revision 1300)
+++ ulp/srp/kernel/srp_hca.h (working copy)
@@ -42,10 +42,10 @@
{
srp_hba_t *p_hba;
-TO_LONG_PTR( ib_ca_handle_t , h_ca) ;
-TO_LONG_PTR( ib_pd_handle_t , h_pd) ;
-TO_LONG_PTR( ib_mr_handle_t , h_mr) ;
-TO_LONG_PTR( mlnx_fmr_pool_handle_t , h_fmr_pool) ;
+ ib_ca_handle_t h_ca;
+ ib_pd_handle_t h_pd;
+ ib_mr_handle_t h_mr;
+ mlnx_fmr_pool_handle_t h_fmr_pool;
uint32_t fmr_page_size;
uint32_t fmr_page_shift;
uint64_t vaddr;
Index: ulp/srp/kernel/srp_descriptors.c
===================================================================
--- ulp/srp/kernel/srp_descriptors.c (revision 1300)
+++ ulp/srp/kernel/srp_descriptors.c (working copy)
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corp. All rights reserved.
*
* This software is available to you under the OpenIB.org BSD license
* below:
@@ -59,8 +60,8 @@
__srp_create_recv_descriptors(
IN OUT srp_descriptors_t *p_descriptors,
IN ib_al_ifc_t* const p_ifc,
- IN ib_pd_handle_t FUNC_PTR64 h_pd,
- IN ib_qp_handle_t FUNC_PTR64 h_qp,
+ IN ib_pd_handle_t h_pd,
+ IN ib_qp_handle_t h_qp,
IN net32_t lkey)
{
ib_api_status_t status = IB_SUCCESS;
@@ -104,7 +105,7 @@
for ( i = 0; i < p_descriptors->recv_descriptor_count; i++ )
{
p_descriptor->wr.p_next = NULL;
- p_descriptor->wr.wr_id = (uint64_t)((void* VOID_PTR64)p_descriptor);
+ p_descriptor->wr.wr_id = (uint64_t)((void*)p_descriptor);
p_descriptor->wr.num_ds = 1;
p_descriptor->wr.ds_array = p_descriptor->ds;
@@ -151,8 +152,8 @@
IN uint32_t recv_descriptor_count,
IN uint32_t recv_data_segment_size,
IN ib_al_ifc_t* const p_ifc,
- IN ib_pd_handle_t FUNC_PTR64 h_pd,
- IN ib_qp_handle_t FUNC_PTR64 h_qp,
+ IN ib_pd_handle_t h_pd,
+ IN ib_qp_handle_t h_qp,
IN net32_t lkey)
{
ib_api_status_t status;
Index: ulp/srp/kernel/srp_connection.h
===================================================================
--- ulp/srp/kernel/srp_connection.h (revision 1300)
+++ ulp/srp/kernel/srp_connection.h (working copy)
@@ -66,9 +66,9 @@
srp_connection_state_t state;
-TO_LONG_PTR( ib_cq_handle_t , h_send_cq) ;
-TO_LONG_PTR( ib_cq_handle_t , h_recv_cq) ;
-TO_LONG_PTR( ib_qp_handle_t , h_qp) ;
+ ib_cq_handle_t h_send_cq;
+ ib_cq_handle_t h_recv_cq;
+ ib_qp_handle_t h_qp;
ib_path_rec_t *p_path_rec;
srp_ib_port_id_t init_port_id;
Index: ulp/srp/kernel/srp_descriptors.h
===================================================================
--- ulp/srp/kernel/srp_descriptors.h (revision 1300)
+++ ulp/srp/kernel/srp_descriptors.h (working copy)
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
+ * Portions Copyright (c) 2008 Microsoft Corp. All rights reserved.
*
* This software is available to you under the OpenIB.org BSD license
* below:
@@ -58,7 +59,7 @@
ib_send_wr_t wr;
uint64_t tag;
SCSI_REQUEST_BLOCK *p_srb;
-TO_LONG_PTR( mlnx_fmr_pool_el_t , p_fmr_el) ;
+ mlnx_fmr_pool_el_t p_fmr_el;
ib_local_ds_t ds[SRP_NUM_SGE];
/* must be the last*/
uint8_t data_segment[SRP_MAX_IU_SIZE];
@@ -95,8 +96,8 @@
IN uint32_t recv_descriptor_count,
IN uint32_t recv_data_segment_size,
IN ib_al_ifc_t* const p_ifc,
- IN ib_pd_handle_t FUNC_PTR64 h_pd,
- IN ib_qp_handle_t FUNC_PTR64 h_qp,
+ IN ib_pd_handle_t h_pd,
+ IN ib_qp_handle_t h_qp,
IN net32_t lkey);
ib_api_status_t
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srp.patch
Type: application/octet-stream
Size: 9643 bytes
Desc: srp.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080626/b5ce82a7/attachment.obj>
More information about the ofw
mailing list