[openib-general] Re: [PATCH][SDP] replace __inline__ with plain inline

Libor Michalek libor at topspin.com
Tue Feb 22 19:12:48 PST 2005


On Tue, Feb 22, 2005 at 01:10:21PM -0800, Tom Duffy wrote:
> On Sun, 2005-02-20 at 02:05 +0200, Michael S. Tsirkin wrote:
> > I think we also should replace __inline__ with inline everywhere.

  Thanks, I've commited the change.

-Libor

> Index: sdp_queue.h
> ===================================================================
> --- sdp_queue.h	(revision 1865)
> +++ sdp_queue.h	(working copy)
> @@ -73,7 +73,7 @@ struct sdpc_desc_q {
>  /*
>   * __sdp_desc_q_size - return the number of elements in the table
>   */
> -static __inline__ int __sdp_desc_q_size(struct sdpc_desc_q *table)
> +static inline int __sdp_desc_q_size(struct sdpc_desc_q *table)
>  {
>  	return table->size;
>  } /* __sdp_desc_q_size */
> @@ -81,7 +81,7 @@ static __inline__ int __sdp_desc_q_size(
>  /*
>   * __sdp_desc_q_member - return non-zero if element is in a table
>   */
> -static __inline__ int __sdp_desc_q_member(struct sdpc_desc *element)
> +static inline int __sdp_desc_q_member(struct sdpc_desc *element)
>  {
>  	return ((NULL == element->table) ? 0 : 1);
>  } /* __sdp_desc_q_member */
> Index: sdp_proto.h
> ===================================================================
> --- sdp_proto.h	(revision 1865)
> +++ sdp_proto.h	(working copy)
> @@ -569,7 +569,7 @@ do {                                    
>  /*
>   * __sdp_inet_write_space - writable space on send side
>   */
> -static __inline__ int __sdp_inet_write_space(struct sdp_opt *conn, int urg)
> +static inline int __sdp_inet_write_space(struct sdp_opt *conn, int urg)
>  {
>  	int size;
>  
> @@ -594,7 +594,7 @@ static __inline__ int __sdp_inet_write_s
>  /*
>   * __sdp_inet_writable - return non-zero if socket is writable
>   */
> -static __inline__ int __sdp_inet_writable(struct sdp_opt *conn)
> +static inline int __sdp_inet_writable(struct sdp_opt *conn)
>  {
>  	SDP_CHECK_NULL(conn, -EINVAL);
>  
> @@ -608,7 +608,7 @@ static __inline__ int __sdp_inet_writabl
>  /*
>   * __sdp_conn_stat_dump - dump stats to the log
>   */
> -static __inline__ int __sdp_conn_stat_dump(struct sdp_opt *conn)
> +static inline int __sdp_conn_stat_dump(struct sdp_opt *conn)
>  {
>  #ifdef _SDP_CONN_STATS_REC
>  	int counter;
> @@ -631,7 +631,7 @@ static __inline__ int __sdp_conn_stat_du
>  /*
>   * __sdp_conn_state_dump - dump state information to the log
>   */
> -static __inline__ int __sdp_conn_state_dump(struct sdp_opt *conn)
> +static inline int __sdp_conn_state_dump(struct sdp_opt *conn)
>  {
>  #ifdef _SDP_CONN_STATE_REC
>  	int counter;
> Index: sdp_msgs.h
> ===================================================================
> --- sdp_msgs.h	(revision 1865)
> +++ sdp_msgs.h	(working copy)
> @@ -278,7 +278,7 @@ struct msg_hdr_sch {
>  /*
>   * __sdp_msg_swap_bsdh - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_bsdh(struct msg_hdr_bsdh *header)
> +static inline void __sdp_msg_swap_bsdh(struct msg_hdr_bsdh *header)
>  {
>  	header->recv_bufs = cpu_to_be16(header->recv_bufs);
>  	header->size = cpu_to_be32(header->size);
> @@ -289,7 +289,7 @@ static __inline__ void __sdp_msg_swap_bs
>  /*
>   * __sdp_msg_swap_hh - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_hh(struct msg_hdr_hh *header)
> +static inline void __sdp_msg_swap_hh(struct msg_hdr_hh *header)
>  {
>  	header->r_rcv_size = cpu_to_be32(header->r_rcv_size);
>  	header->l_rcv_size = cpu_to_be32(header->l_rcv_size);
> @@ -307,7 +307,7 @@ static __inline__ void __sdp_msg_swap_hh
>  /*
>   * __sdp_msg_swap_hah - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_hah(struct msg_hdr_hah *header)
> +static inline void __sdp_msg_swap_hah(struct msg_hdr_hah *header)
>  {
>  	header->l_rcv_size = cpu_to_be32(header->l_rcv_size);
>  } /* __sdp_msg_swap_hah */
> @@ -315,7 +315,7 @@ static __inline__ void __sdp_msg_swap_ha
>  /*
>   * __sdp_msg_swap_srcah - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_srcah(struct msg_hdr_srcah *header)
> +static inline void __sdp_msg_swap_srcah(struct msg_hdr_srcah *header)
>  {
>  	header->size = cpu_to_be32(header->size);
>  #ifdef _SDP_MS_APRIL_ERROR_COMPAT
> @@ -330,7 +330,7 @@ static __inline__ void __sdp_msg_swap_sr
>  /*
>   * __sdp_msg_swap_snkah - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_snkah(struct msg_hdr_snkah *header)
> +static inline void __sdp_msg_swap_snkah(struct msg_hdr_snkah *header)
>  {
>  	header->size = cpu_to_be32(header->size);
>  	header->r_key = cpu_to_be32(header->r_key);
> @@ -341,7 +341,7 @@ static __inline__ void __sdp_msg_swap_sn
>  /*
>   * __sdp_msg_swap_rwch - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_rwch(struct msg_hdr_rwch *header)
> +static inline void __sdp_msg_swap_rwch(struct msg_hdr_rwch *header)
>  {
>  	header->size = cpu_to_be32(header->size);
>  } /* __sdp_msg_swap_rwch */
> @@ -349,7 +349,7 @@ static __inline__ void __sdp_msg_swap_rw
>  /*
>   * __sdp_msg_swap_rrch - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_rrch(struct msg_hdr_rrch *header)
> +static inline void __sdp_msg_swap_rrch(struct msg_hdr_rrch *header)
>  {
>  	header->size = cpu_to_be32(header->size);
>  } /* __sdp_msg_swap_rrch */
> @@ -357,7 +357,7 @@ static __inline__ void __sdp_msg_swap_rr
>  /*
>   * __sdp_msg_swap_mch - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_mch(struct msg_hdr_mch *header)
> +static inline void __sdp_msg_swap_mch(struct msg_hdr_mch *header)
>  {
>  	return;
>  } /* __sdp_msg_swap_ */
> @@ -365,7 +365,7 @@ static __inline__ void __sdp_msg_swap_mc
>  /*
>   * __sdp_msg_swap_crbh - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_crbh(struct msg_hdr_crbh *header)
> +static inline void __sdp_msg_swap_crbh(struct msg_hdr_crbh *header)
>  {
>  	header->size = cpu_to_be32(header->size);
>  } /* __sdp_msg_swap_crbh */
> @@ -373,7 +373,7 @@ static __inline__ void __sdp_msg_swap_cr
>  /*
>   * __sdp_msg_swap_crbah - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_crbah(struct msg_hdr_crbah *header)
> +static inline void __sdp_msg_swap_crbah(struct msg_hdr_crbah *header)
>  {
>  	header->size = cpu_to_be32(header->size);
>  } /* __sdp_msg_swap_crbah */
> @@ -381,7 +381,7 @@ static __inline__ void __sdp_msg_swap_cr
>  /*
>   * __sdp_msg_swap_sch - SDP header endian byte swapping
>   */
> -static __inline__ void __sdp_msg_swap_sch(struct msg_hdr_sch *header)
> +static inline void __sdp_msg_swap_sch(struct msg_hdr_sch *header)
>  {
>  	header->service_id = cpu_to_be64(header->service_id);
>  } /* __sdp_msg_swap_sch */
> Index: sdp_send.c
> ===================================================================
> --- sdp_send.c	(revision 1865)
> +++ sdp_send.c	(working copy)
> @@ -1094,8 +1094,7 @@ done:
>  /*
>   * _sdp_send_data_buff_get - get an appropriate write buffer for send
>   */
> -static __inline__ struct sdpc_buff *_sdp_send_data_buff_get(
> -	struct sdp_opt *conn)
> +static inline struct sdpc_buff *_sdp_send_data_buff_get(struct sdp_opt *conn)
>  {
>  	struct sdpc_buff *buff;
>  
> @@ -1121,10 +1120,10 @@ static __inline__ struct sdpc_buff *_sdp
>  /*
>   * _sdp_send_data_buff_put - place a buffer into the send queue
>   */
> -static __inline__ int _sdp_send_data_buff_put(struct sdp_opt *conn,
> -					      struct sdpc_buff *buff,
> -					      int size,
> -					      int urg)
> +static inline int _sdp_send_data_buff_put(struct sdp_opt *conn,
> +					  struct sdpc_buff *buff,
> +					  int size,
> +					  int urg)
>  {
>  	int result = 0;
>  	int expect;
> Index: sdp_iocb.h
> ===================================================================
> --- sdp_iocb.h	(revision 1865)
> +++ sdp_iocb.h	(working copy)
> @@ -131,7 +131,7 @@ struct sdpc_iocb_q {
>  /*
>   * __sdp_kmap - map a page into kernel space
>   */
> -static __inline__ void *__sdp_kmap(struct page *page)
> +static inline void *__sdp_kmap(struct page *page)
>  {
>  	if (in_atomic() || irqs_disabled())
>  		return kmap_atomic(page, KM_IRQ0);
> @@ -142,7 +142,7 @@ static __inline__ void *__sdp_kmap(struc
>  /*
>   * __sdp_kunmap - unmap a page into kernel space
>   */
> -static __inline__ void __sdp_kunmap(struct page *page)
> +static inline void __sdp_kunmap(struct page *page)
>  {
>  	if (in_atomic() || irqs_disabled())
>  		kunmap_atomic(page, KM_IRQ0);
> Index: sdp_buff.c
> ===================================================================
> --- sdp_buff.c	(revision 1865)
> +++ sdp_buff.c	(working copy)
> @@ -42,12 +42,12 @@ static struct sdpc_buff_root *main_pool 
>  /*
>   * _sdp_buff_q_get - Get a buffer from a specific pool
>   */
> -static __inline__ struct sdpc_buff *_sdp_buff_q_get(struct sdpc_buff_q *pool,
> -						    int fifo,
> -						    int (*test_func)
> -							(struct sdpc_buff *buff,
> -							 void *arg),
> -						    void *usr_arg)
> +static inline struct sdpc_buff *_sdp_buff_q_get(struct sdpc_buff_q *pool,
> +						int fifo,
> +						int (*test_func)
> +						     (struct sdpc_buff *buff,
> +						      void *arg),
> +						void *usr_arg)
>  {
>  	struct sdpc_buff *buff;
>  
> @@ -86,9 +86,9 @@ static __inline__ struct sdpc_buff *_sdp
>  /*
>   * _sdp_buff_q_put - Place a buffer into a specific pool
>   */
> -static __inline__ int _sdp_buff_q_put(struct sdpc_buff_q *pool,
> -				      struct sdpc_buff *buff,
> -				      int fifo)
> +static inline int _sdp_buff_q_put(struct sdpc_buff_q *pool,
> +				  struct sdpc_buff *buff,
> +				  int fifo)
>  {
>  	/* fifo: false == tail, true == head */
>  	SDP_CHECK_NULL(pool, -EINVAL);
> @@ -121,8 +121,8 @@ static __inline__ int _sdp_buff_q_put(st
>  /*
>   * _sdp_buff_q_look - look at a buffer from a specific pool
>   */
> -static __inline__ struct sdpc_buff *_sdp_buff_q_look(struct sdpc_buff_q *pool,
> -						     int fifo)
> +static inline struct sdpc_buff *_sdp_buff_q_look(struct sdpc_buff_q *pool,
> +						 int fifo)
>  {
>  	SDP_CHECK_NULL(pool, NULL);
>  
> @@ -135,8 +135,8 @@ static __inline__ struct sdpc_buff *_sdp
>  /*
>   * _sdp_buff_q_remove - remove a specific buffer from a specific pool
>   */
> -static __inline__ int _sdp_buff_q_remove(struct sdpc_buff_q *pool, 
> -					 struct sdpc_buff *buff)
> +static inline int _sdp_buff_q_remove(struct sdpc_buff_q *pool, 
> +				     struct sdpc_buff *buff)
>  {
>  	struct sdpc_buff *prev;
>  	struct sdpc_buff *next;
> @@ -448,10 +448,7 @@ static int _sdp_buff_pool_release(struct
>  /*
>   * _sdp_buff_pool_release_check - check for buffer release from main pool
>   */
> -static __inline__ int _sdp_buff_pool_release_check
> -(
> -	struct sdpc_buff_root *m_pool
> -)
> +static inline int _sdp_buff_pool_release_check(struct sdpc_buff_root *m_pool)
>  {
>  	SDP_CHECK_NULL(m_pool, -EINVAL);
>  	/*
> Index: sdp_queue.c
> ===================================================================
> --- sdp_queue.c	(revision 1865)
> +++ sdp_queue.c	(working copy)
> @@ -79,9 +79,9 @@ static struct sdpc_desc *_sdp_desc_q_get
>  /*
>   * _sdp_desc_q_put - Place an element into a specific table
>   */
> -static __inline__ int _sdp_desc_q_put(struct sdpc_desc_q *table,
> -				      struct sdpc_desc *element, 
> -				      int fifo)
> +static inline int _sdp_desc_q_put(struct sdpc_desc_q *table,
> +				  struct sdpc_desc *element, 
> +				  int fifo)
>  {
>  	/*
>  	 * fifo: false == tail, true == head



More information about the general mailing list