From patchwork Wed Oct 11 17:49:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10000183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC62260244 for ; Wed, 11 Oct 2017 17:50:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D82CF28B08 for ; Wed, 11 Oct 2017 17:50:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC7C528B16; Wed, 11 Oct 2017 17:50:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 277D428B08 for ; Wed, 11 Oct 2017 17:50:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752697AbdJKRuC (ORCPT ); Wed, 11 Oct 2017 13:50:02 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:51693 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757588AbdJKRt6 (ORCPT ); Wed, 11 Oct 2017 13:49:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1507744198; x=1539280198; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=2b6AUMdcXeuU2kGQvcWHznP8U8doZWD+NFzJAeNtBNs=; b=ktiEXDk+cQTBVLKebP1a0VcaoP0ELArnbVOI7E7rBA+fkwcHj9Bwm5om hPMCEf8MZbfNYIKo5xVsb4fP+kNxB+qNV0zHZ8+oyDEtA14CICaQ6zf2q CS3irPQnhWOOy4KeYlD903cml5gp2SzFxI1okOF+0kKJW5z1bYklYUnOz 1nyb7TIHiswyOG9TDjOBQgMOqReds07QP4Yn6rjpdw8n5J0klKdUBW7yW M6LdAAKpiC5Rhr30pyLmVtIl6pSnFZJLLeGnZRkacj0xn6s8GuCl2OKfd DaoHaLsRkWdgMiwce19tCDrMPjLmU7KGB7RQjl49bxT32MqmFKcUUNQlt g==; X-IronPort-AV: E=Sophos;i="5.43,362,1503331200"; d="scan'208";a="57687632" Received: from sjappemgw11.hgst.com (HELO sjappemgw12.hgst.com) ([199.255.44.62]) by ob1.hgst.iphmx.com with ESMTP; 12 Oct 2017 01:49:45 +0800 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO thinkpad-bart.int.fusionio.com) ([10.11.172.152]) by sjappemgw12.hgst.com with ESMTP; 11 Oct 2017 10:49:29 -0700 From: Bart Van Assche To: Doug Ledford Cc: linux-rdma@vger.kernel.org, Bart Van Assche , Michal Kalderon Subject: [PATCH v2 35/45] RDMA/qedr: Declare local functions static Date: Wed, 11 Oct 2017 10:49:17 -0700 Message-Id: <20171011174927.25113-36-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171011174927.25113-1-bart.vanassche@wdc.com> References: <20171011174927.25113-1-bart.vanassche@wdc.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Bart Van Assche Cc: Michal Kalderon --- drivers/infiniband/hw/qedr/main.c | 22 +++++++++++----------- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 14 +++++++------- drivers/infiniband/hw/qedr/qedr_roce_cm.c | 27 +++++++++++++-------------- drivers/infiniband/hw/qedr/verbs.c | 2 +- 4 files changed, 32 insertions(+), 33 deletions(-) diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c index 1afc26785049..be282e4915d8 100644 --- a/drivers/infiniband/hw/qedr/main.c +++ b/drivers/infiniband/hw/qedr/main.c @@ -54,8 +54,8 @@ MODULE_LICENSE("Dual BSD/GPL"); #define QEDR_WQ_MULTIPLIER_DFT (3) -void qedr_ib_dispatch_event(struct qedr_dev *dev, u8 port_num, - enum ib_event_type type) +static void qedr_ib_dispatch_event(struct qedr_dev *dev, u8 port_num, + enum ib_event_type type) { struct ib_event ibev; @@ -96,8 +96,8 @@ static struct net_device *qedr_get_netdev(struct ib_device *dev, u8 port_num) return qdev->ndev; } -int qedr_roce_port_immutable(struct ib_device *ibdev, u8 port_num, - struct ib_port_immutable *immutable) +static int qedr_roce_port_immutable(struct ib_device *ibdev, u8 port_num, + struct ib_port_immutable *immutable) { struct ib_port_attr attr; int err; @@ -115,8 +115,8 @@ int qedr_roce_port_immutable(struct ib_device *ibdev, u8 port_num, return 0; } -int qedr_iw_port_immutable(struct ib_device *ibdev, u8 port_num, - struct ib_port_immutable *immutable) +static int qedr_iw_port_immutable(struct ib_device *ibdev, u8 port_num, + struct ib_port_immutable *immutable) { struct ib_port_attr attr; int err; @@ -133,7 +133,7 @@ int qedr_iw_port_immutable(struct ib_device *ibdev, u8 port_num, return 0; } -int qedr_iw_register_device(struct qedr_dev *dev) +static int qedr_iw_register_device(struct qedr_dev *dev) { dev->ibdev.node_type = RDMA_NODE_RNIC; dev->ibdev.query_gid = qedr_iw_query_gid; @@ -159,7 +159,7 @@ int qedr_iw_register_device(struct qedr_dev *dev) return 0; } -void qedr_roce_register_device(struct qedr_dev *dev) +static void qedr_roce_register_device(struct qedr_dev *dev) { dev->ibdev.node_type = RDMA_NODE_IB_CA; dev->ibdev.query_gid = qedr_query_gid; @@ -689,12 +689,12 @@ static int qedr_set_device_attr(struct qedr_dev *dev) return 0; } -void qedr_unaffiliated_event(void *context, u8 event_code) +static void qedr_unaffiliated_event(void *context, u8 event_code) { pr_err("unaffiliated event not implemented yet\n"); } -void qedr_affiliated_event(void *context, u8 e_code, void *fw_handle) +static void qedr_affiliated_event(void *context, u8 e_code, void *fw_handle) { #define EVENT_TYPE_NOT_DEFINED 0 #define EVENT_TYPE_CQ 1 @@ -833,7 +833,7 @@ static int qedr_init_hw(struct qedr_dev *dev) return rc; } -void qedr_stop_hw(struct qedr_dev *dev) +static void qedr_stop_hw(struct qedr_dev *dev) { dev->ops->rdma_remove_user(dev->rdma_ctx, dev->dpi); dev->ops->rdma_stop(dev->rdma_ctx); diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c b/drivers/infiniband/hw/qedr/qedr_iw_cm.c index 2950d3f6ecb8..478b7317b80a 100644 --- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c +++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c @@ -79,7 +79,7 @@ qedr_fill_sockaddr6(const struct qed_iwarp_cm_info *cm_info, } } -void +static void qedr_iw_mpa_request(void *context, struct qed_iwarp_cm_event_params *params) { struct qedr_iw_listener *listener = (struct qedr_iw_listener *)context; @@ -113,7 +113,7 @@ qedr_iw_mpa_request(void *context, struct qed_iwarp_cm_event_params *params) listener->cm_id->event_handler(listener->cm_id, &event); } -void +static void qedr_iw_issue_event(void *context, struct qed_iwarp_cm_event_params *params, enum iw_cm_event_type event_type) @@ -136,7 +136,7 @@ qedr_iw_issue_event(void *context, ep->cm_id->event_handler(ep->cm_id, &event); } -void +static void qedr_iw_close_event(void *context, struct qed_iwarp_cm_event_params *params) { struct qedr_iw_ep *ep = (struct qedr_iw_ep *)context; @@ -149,7 +149,7 @@ qedr_iw_close_event(void *context, struct qed_iwarp_cm_event_params *params) } } -void +static void qedr_iw_qp_event(void *context, struct qed_iwarp_cm_event_params *params, enum ib_event_type ib_event, char *str) @@ -217,7 +217,7 @@ static void qedr_iw_disconnect_worker(struct work_struct *work) qedr_iw_qp_rem_ref(&qp->ibqp); } -void +static void qedr_iw_disconnect_event(void *context, struct qed_iwarp_cm_event_params *params) { @@ -262,7 +262,7 @@ qedr_iw_passive_complete(void *context, qedr_iw_close_event(context, params); } -int +static int qedr_iw_mpa_reply(void *context, struct qed_iwarp_cm_event_params *params) { struct qedr_iw_ep *ep = (struct qedr_iw_ep *)context; @@ -274,7 +274,7 @@ qedr_iw_mpa_reply(void *context, struct qed_iwarp_cm_event_params *params) return dev->ops->iwarp_send_rtr(dev->rdma_ctx, &rtr_in); } -int +static int qedr_iw_event_handler(void *context, struct qed_iwarp_cm_event_params *params) { struct qedr_iw_ep *ep = (struct qedr_iw_ep *)context; diff --git a/drivers/infiniband/hw/qedr/qedr_roce_cm.c b/drivers/infiniband/hw/qedr/qedr_roce_cm.c index 2a0346678ddd..9dbf0cc985f3 100644 --- a/drivers/infiniband/hw/qedr/qedr_roce_cm.c +++ b/drivers/infiniband/hw/qedr/qedr_roce_cm.c @@ -64,11 +64,11 @@ void qedr_store_gsi_qp_cq(struct qedr_dev *dev, struct qedr_qp *qp, dev->gsi_qp = qp; } -void qedr_ll2_complete_tx_packet(void *cxt, - u8 connection_handle, - void *cookie, - dma_addr_t first_frag_addr, - bool b_last_fragment, bool b_last_packet) +static void qedr_ll2_complete_tx_packet(void *cxt, u8 connection_handle, + void *cookie, + dma_addr_t first_frag_addr, + bool b_last_fragment, + bool b_last_packet) { struct qedr_dev *dev = (struct qedr_dev *)cxt; struct qed_roce_ll2_packet *pkt = cookie; @@ -93,8 +93,8 @@ void qedr_ll2_complete_tx_packet(void *cxt, (*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context); } -void qedr_ll2_complete_rx_packet(void *cxt, - struct qed_ll2_comp_rx_data *data) +static void qedr_ll2_complete_rx_packet(void *cxt, + struct qed_ll2_comp_rx_data *data) { struct qedr_dev *dev = (struct qedr_dev *)cxt; struct qedr_cq *cq = dev->gsi_rqcq; @@ -122,10 +122,9 @@ void qedr_ll2_complete_rx_packet(void *cxt, (*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context); } -void qedr_ll2_release_rx_packet(void *cxt, - u8 connection_handle, - void *cookie, - dma_addr_t rx_buf_addr, bool b_last_packet) +static void qedr_ll2_release_rx_packet(void *cxt, u8 connection_handle, + void *cookie, dma_addr_t rx_buf_addr, + bool b_last_packet) { /* Do nothing... */ } @@ -237,7 +236,7 @@ static int qedr_ll2_post_tx(struct qedr_dev *dev, return 0; } -int qedr_ll2_stop(struct qedr_dev *dev) +static int qedr_ll2_stop(struct qedr_dev *dev) { int rc; @@ -260,8 +259,8 @@ int qedr_ll2_stop(struct qedr_dev *dev) return rc; } -int qedr_ll2_start(struct qedr_dev *dev, - struct ib_qp_init_attr *attrs, struct qedr_qp *qp) +static int qedr_ll2_start(struct qedr_dev *dev, + struct ib_qp_init_attr *attrs, struct qedr_qp *qp) { struct qed_ll2_acquire_data data; struct qed_ll2_cbs cbs; diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index a8a6e66767d5..5acb9eab64ed 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -2268,7 +2268,7 @@ int qedr_query_qp(struct ib_qp *ibqp, return rc; } -int qedr_free_qp_resources(struct qedr_dev *dev, struct qedr_qp *qp) +static int qedr_free_qp_resources(struct qedr_dev *dev, struct qedr_qp *qp) { int rc = 0;