diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-02-01 05:27:43 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-09 11:35:59 -0800 |
commit | aef0ce768ce04852a8be1a74034d125ebfdb05c8 (patch) | |
tree | f738bb2656e9c7cddfb3d6c41e90e3a9c72e0d69 | |
parent | 0b37b559cb0441682d327770f148336d7749d4cc (diff) | |
download | libibverbs-aef0ce768ce04852a8be1a74034d125ebfdb05c8.tar.gz |
Remove useless "extern" from function declarations
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | include/infiniband/driver.h | 120 | ||||
-rw-r--r-- | include/infiniband/marshall.h | 12 | ||||
-rw-r--r-- | include/infiniband/verbs.h | 96 |
4 files changed, 119 insertions, 114 deletions
@@ -1,3 +1,8 @@ +2006-01-31 Roland Dreier <rdreier@cisco.com> + + * include/infiniband/verbs.h, include/infiniband/driver.h: Remove + useless "extern" from function declarations. + 2006-01-26 Roland Dreier <rdreier@cisco.com> * include/infiniband/driver.h, src/cmd.c (ibv_cmd_resize_cq): Add diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h index 60826f8..6d04210 100644 --- a/include/infiniband/driver.h +++ b/include/infiniband/driver.h @@ -65,67 +65,67 @@ typedef struct ibv_device *(*ibv_driver_init_func)(struct sysfs_class_device *); -extern int ibv_cmd_get_context(struct ibv_context *context, struct ibv_get_context *cmd, - size_t cmd_size, struct ibv_get_context_resp *resp, - size_t resp_size); -extern int ibv_cmd_query_device(struct ibv_context *context, - struct ibv_device_attr *device_attr, - uint64_t *raw_fw_ver, - struct ibv_query_device *cmd, size_t cmd_size); -extern int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num, - struct ibv_port_attr *port_attr, - struct ibv_query_port *cmd, size_t cmd_size); -extern int ibv_cmd_query_gid(struct ibv_context *context, uint8_t port_num, - int index, union ibv_gid *gid); -extern int ibv_cmd_query_pkey(struct ibv_context *context, uint8_t port_num, - int index, uint16_t *pkey); -extern int ibv_cmd_alloc_pd(struct ibv_context *context, struct ibv_pd *pd, - struct ibv_alloc_pd *cmd, size_t cmd_size, - struct ibv_alloc_pd_resp *resp, size_t resp_size); -extern int ibv_cmd_dealloc_pd(struct ibv_pd *pd); -extern int ibv_cmd_reg_mr(struct ibv_pd *pd, void *addr, size_t length, - uint64_t hca_va, enum ibv_access_flags access, - struct ibv_mr *mr, struct ibv_reg_mr *cmd, - size_t cmd_size); -extern int ibv_cmd_dereg_mr(struct ibv_mr *mr); -extern int ibv_cmd_create_cq(struct ibv_context *context, int cqe, - struct ibv_comp_channel *channel, - int comp_vector, struct ibv_cq *cq, - struct ibv_create_cq *cmd, size_t cmd_size, - struct ibv_create_cq_resp *resp, size_t resp_size); -extern int ibv_cmd_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc); -extern int ibv_cmd_req_notify_cq(struct ibv_cq *cq, int solicited_only); -extern int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe, - struct ibv_resize_cq *cmd, size_t cmd_size); -extern int ibv_cmd_destroy_cq(struct ibv_cq *cq); +int ibv_cmd_get_context(struct ibv_context *context, struct ibv_get_context *cmd, + size_t cmd_size, struct ibv_get_context_resp *resp, + size_t resp_size); +int ibv_cmd_query_device(struct ibv_context *context, + struct ibv_device_attr *device_attr, + uint64_t *raw_fw_ver, + struct ibv_query_device *cmd, size_t cmd_size); +int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num, + struct ibv_port_attr *port_attr, + struct ibv_query_port *cmd, size_t cmd_size); +int ibv_cmd_query_gid(struct ibv_context *context, uint8_t port_num, + int index, union ibv_gid *gid); +int ibv_cmd_query_pkey(struct ibv_context *context, uint8_t port_num, + int index, uint16_t *pkey); +int ibv_cmd_alloc_pd(struct ibv_context *context, struct ibv_pd *pd, + struct ibv_alloc_pd *cmd, size_t cmd_size, + struct ibv_alloc_pd_resp *resp, size_t resp_size); +int ibv_cmd_dealloc_pd(struct ibv_pd *pd); +int ibv_cmd_reg_mr(struct ibv_pd *pd, void *addr, size_t length, + uint64_t hca_va, enum ibv_access_flags access, + struct ibv_mr *mr, struct ibv_reg_mr *cmd, + size_t cmd_size); +int ibv_cmd_dereg_mr(struct ibv_mr *mr); +int ibv_cmd_create_cq(struct ibv_context *context, int cqe, + struct ibv_comp_channel *channel, + int comp_vector, struct ibv_cq *cq, + struct ibv_create_cq *cmd, size_t cmd_size, + struct ibv_create_cq_resp *resp, size_t resp_size); +int ibv_cmd_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc); +int ibv_cmd_req_notify_cq(struct ibv_cq *cq, int solicited_only); +int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe, + struct ibv_resize_cq *cmd, size_t cmd_size); +int ibv_cmd_destroy_cq(struct ibv_cq *cq); -extern int ibv_cmd_create_srq(struct ibv_pd *pd, - struct ibv_srq *srq, struct ibv_srq_init_attr *attr, - struct ibv_create_srq *cmd, size_t cmd_size, - struct ibv_create_srq_resp *resp, size_t resp_size); -extern int ibv_cmd_modify_srq(struct ibv_srq *srq, - struct ibv_srq_attr *srq_attr, - enum ibv_srq_attr_mask srq_attr_mask, - struct ibv_modify_srq *cmd, size_t cmd_size); -extern int ibv_cmd_destroy_srq(struct ibv_srq *srq); +int ibv_cmd_create_srq(struct ibv_pd *pd, + struct ibv_srq *srq, struct ibv_srq_init_attr *attr, + struct ibv_create_srq *cmd, size_t cmd_size, + struct ibv_create_srq_resp *resp, size_t resp_size); +int ibv_cmd_modify_srq(struct ibv_srq *srq, + struct ibv_srq_attr *srq_attr, + enum ibv_srq_attr_mask srq_attr_mask, + struct ibv_modify_srq *cmd, size_t cmd_size); +int ibv_cmd_destroy_srq(struct ibv_srq *srq); -extern int ibv_cmd_create_qp(struct ibv_pd *pd, - struct ibv_qp *qp, struct ibv_qp_init_attr *attr, - struct ibv_create_qp *cmd, size_t cmd_size); -extern int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, - enum ibv_qp_attr_mask attr_mask, - struct ibv_modify_qp *cmd, size_t cmd_size); -extern int ibv_cmd_destroy_qp(struct ibv_qp *qp); -extern int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr, - struct ibv_send_wr **bad_wr); -extern int ibv_cmd_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr, - struct ibv_recv_wr **bad_wr); -extern int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr, - struct ibv_recv_wr **bad_wr); -extern int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah, - struct ibv_ah_attr *attr); -extern int ibv_cmd_destroy_ah(struct ibv_ah *ah); -extern int ibv_cmd_attach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid); -extern int ibv_cmd_detach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid); +int ibv_cmd_create_qp(struct ibv_pd *pd, + struct ibv_qp *qp, struct ibv_qp_init_attr *attr, + struct ibv_create_qp *cmd, size_t cmd_size); +int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, + enum ibv_qp_attr_mask attr_mask, + struct ibv_modify_qp *cmd, size_t cmd_size); +int ibv_cmd_destroy_qp(struct ibv_qp *qp); +int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr, + struct ibv_send_wr **bad_wr); +int ibv_cmd_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr, + struct ibv_recv_wr **bad_wr); +int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr, + struct ibv_recv_wr **bad_wr); +int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah, + struct ibv_ah_attr *attr); +int ibv_cmd_destroy_ah(struct ibv_ah *ah); +int ibv_cmd_attach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid); +int ibv_cmd_detach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid); #endif /* INFINIBAND_DRIVER_H */ diff --git a/include/infiniband/marshall.h b/include/infiniband/marshall.h index ccd1d3c..d6bd38f 100644 --- a/include/infiniband/marshall.h +++ b/include/infiniband/marshall.h @@ -48,14 +48,14 @@ BEGIN_C_DECLS -extern void ib_copy_qp_attr_from_kern(struct ibv_qp_attr *dst, - struct ibv_kern_qp_attr *src); +void ib_copy_qp_attr_from_kern(struct ibv_qp_attr *dst, + struct ibv_kern_qp_attr *src); -extern void ib_copy_path_rec_from_kern(struct ib_sa_path_rec *dst, - struct ib_kern_path_rec *src); +void ib_copy_path_rec_from_kern(struct ib_sa_path_rec *dst, + struct ib_kern_path_rec *src); -extern void ib_copy_path_rec_to_kern(struct ib_kern_path_rec *dst, - struct ib_sa_path_rec *src); +void ib_copy_path_rec_to_kern(struct ib_kern_path_rec *dst, + struct ib_sa_path_rec *src); END_C_DECLS diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index 2137e6f..7a4f1ea 100644 --- a/include/infiniband/verbs.h +++ b/include/infiniband/verbs.h @@ -593,7 +593,7 @@ struct ibv_context { * Return a NULL-terminated array of IB devices. The array can be * released with ibv_free_device_list(). */ -extern struct ibv_device **ibv_get_device_list(int *num_devices); +struct ibv_device **ibv_get_device_list(int *num_devices); /** * ibv_free_device_list - Free list from ibv_get_device_list() @@ -603,27 +603,27 @@ extern struct ibv_device **ibv_get_device_list(int *num_devices); * ibv_open_device() are no longer valid. Client code must open all * devices it intends to use before calling ibv_free_device_list(). */ -extern void ibv_free_device_list(struct ibv_device **list); +void ibv_free_device_list(struct ibv_device **list); /** * ibv_get_device_name - Return kernel device name */ -extern const char *ibv_get_device_name(struct ibv_device *device); +const char *ibv_get_device_name(struct ibv_device *device); /** * ibv_get_device_guid - Return device's node GUID */ -extern uint64_t ibv_get_device_guid(struct ibv_device *device); +uint64_t ibv_get_device_guid(struct ibv_device *device); /** * ibv_open_device - Initialize device for use */ -extern struct ibv_context *ibv_open_device(struct ibv_device *device); +struct ibv_context *ibv_open_device(struct ibv_device *device); /** * ibv_close_device - Release device */ -extern int ibv_close_device(struct ibv_context *context); +int ibv_close_device(struct ibv_context *context); /** * ibv_get_async_event - Get next async event @@ -632,8 +632,8 @@ extern int ibv_close_device(struct ibv_context *context); * All async events returned by ibv_get_async_event() must eventually * be acknowledged with ibv_ack_async_event(). */ -extern int ibv_get_async_event(struct ibv_context *context, - struct ibv_async_event *event); +int ibv_get_async_event(struct ibv_context *context, + struct ibv_async_event *event); /** * ibv_ack_async_event - Acknowledge an async event @@ -645,62 +645,62 @@ extern int ibv_get_async_event(struct ibv_context *context, * there should be a one-to-one correspondence between acks and * successful gets. */ -extern void ibv_ack_async_event(struct ibv_async_event *event); +void ibv_ack_async_event(struct ibv_async_event *event); /** * ibv_query_device - Get device properties */ -extern int ibv_query_device(struct ibv_context *context, - struct ibv_device_attr *device_attr); +int ibv_query_device(struct ibv_context *context, + struct ibv_device_attr *device_attr); /** * ibv_query_port - Get port properties */ -extern int ibv_query_port(struct ibv_context *context, uint8_t port_num, - struct ibv_port_attr *port_attr); +int ibv_query_port(struct ibv_context *context, uint8_t port_num, + struct ibv_port_attr *port_attr); /** * ibv_query_gid - Get a GID table entry */ -extern int ibv_query_gid(struct ibv_context *context, uint8_t port_num, - int index, union ibv_gid *gid); +int ibv_query_gid(struct ibv_context *context, uint8_t port_num, + int index, union ibv_gid *gid); /** * ibv_query_pkey - Get a P_Key table entry */ -extern int ibv_query_pkey(struct ibv_context *context, uint8_t port_num, - int index, uint16_t *pkey); +int ibv_query_pkey(struct ibv_context *context, uint8_t port_num, + int index, uint16_t *pkey); /** * ibv_alloc_pd - Allocate a protection domain */ -extern struct ibv_pd *ibv_alloc_pd(struct ibv_context *context); +struct ibv_pd *ibv_alloc_pd(struct ibv_context *context); /** * ibv_dealloc_pd - Free a protection domain */ -extern int ibv_dealloc_pd(struct ibv_pd *pd); +int ibv_dealloc_pd(struct ibv_pd *pd); /** * ibv_reg_mr - Register a memory region */ -extern struct ibv_mr *ibv_reg_mr(struct ibv_pd *pd, void *addr, - size_t length, enum ibv_access_flags access); +struct ibv_mr *ibv_reg_mr(struct ibv_pd *pd, void *addr, + size_t length, enum ibv_access_flags access); /** * ibv_dereg_mr - Deregister a memory region */ -extern int ibv_dereg_mr(struct ibv_mr *mr); +int ibv_dereg_mr(struct ibv_mr *mr); /** * ibv_create_comp_channel - Create a completion event channel */ -extern struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context); +struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context); /** * ibv_destroy_comp_channel - Destroy a completion event channel */ -extern int ibv_destroy_comp_channel(struct ibv_comp_channel *channel); +int ibv_destroy_comp_channel(struct ibv_comp_channel *channel); /** * ibv_create_cq - Create a completion queue @@ -712,10 +712,10 @@ extern int ibv_destroy_comp_channel(struct ibv_comp_channel *channel); * @comp_vector - Completion vector used to signal completion events. * Must be >= 0 and < context->num_comp_vectors. */ -extern struct ibv_cq *ibv_create_cq(struct ibv_context *context, int cqe, - void *cq_context, - struct ibv_comp_channel *channel, - int comp_vector); +struct ibv_cq *ibv_create_cq(struct ibv_context *context, int cqe, + void *cq_context, + struct ibv_comp_channel *channel, + int comp_vector); /** * ibv_resize_cq - Modifies the capacity of the CQ. @@ -724,12 +724,12 @@ extern struct ibv_cq *ibv_create_cq(struct ibv_context *context, int cqe, * * Users can examine the cq structure to determine the actual CQ size. */ -extern int ibv_resize_cq(struct ibv_cq *cq, int cqe); +int ibv_resize_cq(struct ibv_cq *cq, int cqe); /** * ibv_destroy_cq - Destroy a completion queue */ -extern int ibv_destroy_cq(struct ibv_cq *cq); +int ibv_destroy_cq(struct ibv_cq *cq); /** * ibv_get_cq_event - Read next CQ event @@ -740,8 +740,8 @@ extern int ibv_destroy_cq(struct ibv_cq *cq); * All completion events returned by ibv_get_cq_event() must * eventually be acknowledged with ibv_ack_cq_events(). */ -extern int ibv_get_cq_event(struct ibv_comp_channel *channel, - struct ibv_cq **cq, void **cq_context); +int ibv_get_cq_event(struct ibv_comp_channel *channel, + struct ibv_cq **cq, void **cq_context); /** * ibv_ack_cq_events - Acknowledge CQ completion events @@ -756,7 +756,7 @@ extern int ibv_get_cq_event(struct ibv_comp_channel *channel, * acknowledge them in a single call to ibv_ack_cq_events() by passing * the number of events to ack in @nevents. */ -extern void ibv_ack_cq_events(struct ibv_cq *cq, unsigned int nevents); +void ibv_ack_cq_events(struct ibv_cq *cq, unsigned int nevents); /** * ibv_poll_cq - Poll a CQ for work completions @@ -795,8 +795,8 @@ static inline int ibv_req_notify_cq(struct ibv_cq *cq, int solicited_only) * on return. If ibv_create_srq() succeeds, then max_wr and max_sge * will always be at least as large as the requested values. */ -extern struct ibv_srq *ibv_create_srq(struct ibv_pd *pd, - struct ibv_srq_init_attr *srq_init_attr); +struct ibv_srq *ibv_create_srq(struct ibv_pd *pd, + struct ibv_srq_init_attr *srq_init_attr); /** * ibv_modify_srq - Modifies the attributes for the specified SRQ. @@ -810,15 +810,15 @@ extern struct ibv_srq *ibv_create_srq(struct ibv_pd *pd, * IBV_SRQ_LIMIT to set the SRQ's limit and request notification when * the number of receives queued drops below the limit. */ -extern int ibv_modify_srq(struct ibv_srq *srq, - struct ibv_srq_attr *srq_attr, - enum ibv_srq_attr_mask srq_attr_mask); +int ibv_modify_srq(struct ibv_srq *srq, + struct ibv_srq_attr *srq_attr, + enum ibv_srq_attr_mask srq_attr_mask); /** * ibv_destroy_srq - Destroys the specified SRQ. * @srq: The SRQ to destroy. */ -extern int ibv_destroy_srq(struct ibv_srq *srq); +int ibv_destroy_srq(struct ibv_srq *srq); /** * ibv_post_srq_recv - Posts a list of work requests to the specified SRQ. @@ -837,19 +837,19 @@ static inline int ibv_post_srq_recv(struct ibv_srq *srq, /** * ibv_create_qp - Create a queue pair. */ -extern struct ibv_qp *ibv_create_qp(struct ibv_pd *pd, - struct ibv_qp_init_attr *qp_init_attr); +struct ibv_qp *ibv_create_qp(struct ibv_pd *pd, + struct ibv_qp_init_attr *qp_init_attr); /** * ibv_modify_qp - Modify a queue pair. */ -extern int ibv_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, - enum ibv_qp_attr_mask attr_mask); +int ibv_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, + enum ibv_qp_attr_mask attr_mask); /** * ibv_destroy_qp - Destroy a queue pair. */ -extern int ibv_destroy_qp(struct ibv_qp *qp); +int ibv_destroy_qp(struct ibv_qp *qp); /** * ibv_post_send - Post a list of work requests to a send queue. @@ -872,12 +872,12 @@ static inline int ibv_post_recv(struct ibv_qp *qp, struct ibv_recv_wr *wr, /** * ibv_create_ah - Create an address handle. */ -extern struct ibv_ah *ibv_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr); +struct ibv_ah *ibv_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr); /** * ibv_destroy_ah - Destroy an address handle. */ -extern int ibv_destroy_ah(struct ibv_ah *ah); +int ibv_destroy_ah(struct ibv_ah *ah); /** * ibv_attach_mcast - Attaches the specified QP to a multicast group. @@ -890,7 +890,7 @@ extern int ibv_destroy_ah(struct ibv_ah *ah); * the fabric appropriately. The port associated with the specified * QP must also be a member of the multicast group. */ -extern int ibv_attach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid); +int ibv_attach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid); /** * ibv_detach_mcast - Detaches the specified QP from a multicast group. @@ -898,7 +898,7 @@ extern int ibv_attach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid) * @gid: Multicast group GID. * @lid: Multicast group LID in host byte order. */ -extern int ibv_detach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid); +int ibv_detach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid); END_C_DECLS |