[ofw] [PATCH 1/7] ibal: remove uneeded typedefs

Leonid Keller leonid at mellanox.co.il
Sun Jan 18 05:39:39 PST 2009


OK with me.

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Sean Hefty
> Sent: Friday, January 16, 2009 11:25 PM
> To: Hefty, Sean; ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH 1/7] ibal: remove uneeded typedefs
> 
> al_qp.h defines typedefs that are only used later in the same 
> file.  Remove the typedefs and just define the functions 
> inline.  This also avoids a duplicate typedef (with different types).
> 
> Signed-off-by: Sean Hefty <sean.hefty at intel.com>
> ---
> To make things easier, I can commit this change if there's no 
> objection.
> 
> A previous patch may have fixed the duplicate typedef issue; 
> however, the typedefs are unneeded, since they're only 
> referenced in one location immediately below where they're 
> defined.  (And leave_mcast isn't used at all.)
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' 
> trunk/core/al/al_qp.h branches\winverbs/core/al/al_qp.h
> --- trunk/core/al/al_qp.h	2008-07-16 08:53:58.141000000 -0700
> +++ branches\winverbs/core/al/al_qp.h	2009-01-13 
> 23:13:27.421875000 -0800
> @@ -49,58 +49,6 @@
>  #endif	/* CL_KERNEL */
>  
>  
> -typedef ib_api_status_t
> -(*ib_pfn_modify_qp_t)(
> -	IN		const	ib_qp_handle_t			
> 	h_qp,
> -	IN		const	ib_qp_mod_t* const		
> 	p_qp_mod,
> -	IN	OUT			ci_umv_buf_t* const	
> 		p_umv_buf );
> -
> -typedef ib_api_status_t
> -(*ib_pfn_post_send_t)(
> -	IN		const	ib_qp_handle_t			
> 	h_qp,
> -	IN				ib_send_wr_t* const	
> 		p_send_wr,
> -	IN				ib_send_wr_t		
> 		**pp_send_failure OPTIONAL );
> -
> -typedef ib_api_status_t
> -(*ib_pfn_post_recv_t)(
> -	IN		const	ib_qp_handle_t			
> 	h_qp,
> -	IN				ib_recv_wr_t* const	
> 		p_recv_wr,
> -	IN				ib_recv_wr_t		
> 		**p_recv_failure OPTIONAL );
> -
> -typedef ib_api_status_t
> -(*ib_pfn_init_dgrm_svc_t)(
> -	IN		const	ib_qp_handle_t			
> 	h_qp,
> -	IN		const	ib_dgrm_info_t* const		
> p_dgrm_info );
> -
> -typedef ib_api_status_t
> -(*ib_pfn_reg_mad_svc_t)(
> -	IN		const	ib_qp_handle_t			
> 	h_qp,
> -	IN		const	ib_mad_svc_t* const		
> 	p_mad_svc,
> -		OUT			ib_mad_svc_handle_t* 
> const	ph_mad_svc );
> -
> -typedef ib_api_status_t
> -(*ib_pfn_dereg_mad_svc_t)(
> -	IN		const	ib_mad_svc_handle_t		
> 	h_mad_svc );
> -
> -typedef void
> -(*ib_pfn_queue_mad_t)(
> -	IN		const	ib_qp_handle_t			
> 	h_qp,
> -	IN				al_mad_wr_t* const	
> 		p_mad_wr );
> -
> -typedef void
> -(*ib_pfn_resume_mad_t)(
> -	IN		const	ib_qp_handle_t			
> 	h_qp );
> -
> -typedef ib_api_status_t
> -(*ib_pfn_join_mcast_t)(
> -	IN		const	ib_qp_handle_t			
> 	h_qp,
> -	IN		const	ib_mcast_req_t* const		
> p_mcast_req );
> -
> -typedef ib_api_status_t
> -(*ib_pfn_leave_mcast_t)(
> -	IN		const	ib_mcast_handle_t		
> 	h_mcast );
> -
> -
>  /*
>   * Queue pair information required by the access layer.  
> This structure
>   * is referenced by a user's QP handle.
> @@ -132,7 +80,11 @@ typedef struct _ib_qp
>  	 * handle.
>  	 */
>  	ib_qp_handle_t				h_ud_send_qp;
> -	ib_pfn_post_send_t			pfn_ud_post_send;
> +	ib_api_status_t
> +	(*pfn_ud_post_send)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp,
> +		IN				ib_send_wr_t* 
> const			p_send_wr,
> +		IN				ib_send_wr_t	
> 			**pp_send_failure OPTIONAL );
>  
>  	ib_cq_handle_t				h_recv_cq;
>  	ib_cq_handle_t				h_send_cq;
> @@ -144,15 +96,44 @@ typedef struct _ib_qp
>  
>  	ib_pfn_event_cb_t			pfn_event_cb;
>  
> -	ib_pfn_modify_qp_t			pfn_modify_qp;
> -	ib_pfn_post_recv_t			pfn_post_recv;
> -	ib_pfn_post_send_t			pfn_post_send;
> -	ib_pfn_reg_mad_svc_t		pfn_reg_mad_svc;
> -	ib_pfn_dereg_mad_svc_t		pfn_dereg_mad_svc;
> -	ib_pfn_queue_mad_t			pfn_queue_mad;
> -	ib_pfn_resume_mad_t			pfn_resume_mad;
> -	ib_pfn_init_dgrm_svc_t		pfn_init_dgrm_svc;
> -	ib_pfn_join_mcast_t			pfn_join_mcast;
> +	ib_api_status_t
> +	(*pfn_modify_qp)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp,
> +		IN		const	ib_qp_mod_t* const	
> 		p_qp_mod,
> +		IN	OUT			ci_umv_buf_t* 
> const			p_umv_buf );
> +	ib_api_status_t
> +	(*pfn_post_recv)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp,
> +		IN				ib_recv_wr_t* 
> const			p_recv_wr,
> +		IN				ib_recv_wr_t	
> 			**p_recv_failure OPTIONAL );
> +	ib_api_status_t
> +	(*pfn_post_send)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp,
> +		IN				ib_send_wr_t* 
> const			p_send_wr,
> +		IN				ib_send_wr_t	
> 			**pp_send_failure OPTIONAL );
> +	ib_api_status_t
> +	(*pfn_reg_mad_svc)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp,
> +		IN		const	ib_mad_svc_t* const	
> 		p_mad_svc,
> +			OUT			
> ib_mad_svc_handle_t* const	ph_mad_svc );
> +	ib_api_status_t
> +	(*pfn_dereg_mad_svc)(
> +		IN		const	ib_mad_svc_handle_t	
> 		h_mad_svc );
> +	void
> +	(*pfn_queue_mad)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp,
> +		IN				al_mad_wr_t* 
> const			p_mad_wr );
> +	void
> +	(*pfn_resume_mad)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp );
> +	ib_api_status_t
> +	(*pfn_init_dgrm_svc)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp,
> +		IN		const	ib_dgrm_info_t* const	
> 	p_dgrm_info );
> +	ib_api_status_t
> +	(*pfn_join_mcast)(
> +		IN		const	ib_qp_handle_t		
> 		h_qp,
> +		IN		const	ib_mcast_req_t* const	
> 	p_mcast_req );
>  
>  #ifdef CL_KERNEL
>  	ndi_qp_csq_t				*p_irp_queue;
> 
> 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
> 



More information about the ofw mailing list