From patchwork Tue May 9 16:45:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 9718653 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 6B2F960236 for ; Tue, 9 May 2017 16:46:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DBAF28423 for ; Tue, 9 May 2017 16:46:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6272928437; Tue, 9 May 2017 16:46:19 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 10B7828423 for ; Tue, 9 May 2017 16:46:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754291AbdEIQqQ (ORCPT ); Tue, 9 May 2017 12:46:16 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:32996 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753212AbdEIQqP (ORCPT ); Tue, 9 May 2017 12:46:15 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 9 May 2017 19:46:06 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v49Gk5pX006159; Tue, 9 May 2017 19:46:05 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id v49Gk53T004899; Tue, 9 May 2017 19:46:05 +0300 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id v49Gk50T004898; Tue, 9 May 2017 19:46:05 +0300 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, yishaih@mellanox.com, artemyko@mellanox.com, noaos@mellanox.com, majd@mellanox.com Subject: [PATCH rdma-core 1/2] mlx5: Few small fixes Date: Tue, 9 May 2017 19:45:21 +0300 Message-Id: <1494348322-4526-2-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1494348322-4526-1-git-send-email-yishaih@mellanox.com> References: <1494348322-4526-1-git-send-email-yishaih@mellanox.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 From: Artemy Kovalyov 1) Drop redundant line as part of CQE parsing and fix indentation. 2) Under DEBUG mode add a missing 'static' declaration. Signed-off-by: Artemy Kovalyov Reviewed-by: Yishai Hadas --- providers/mlx5/cq.c | 4 +--- providers/mlx5/qp.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/providers/mlx5/cq.c b/providers/mlx5/cq.c index 2e8b584..288e08f 100644 --- a/providers/mlx5/cq.c +++ b/providers/mlx5/cq.c @@ -177,7 +177,7 @@ static inline int handle_responder_lazy(struct mlx5_cq *cq, struct mlx5_cqe64 *c else if (cqe->op_own & MLX5_INLINE_SCATTER_64) err = mlx5_copy_to_recv_wqe(qp, wqe_ctr, cqe - 1, be32toh(cqe->byte_cnt)); -} + } return err; } @@ -228,8 +228,6 @@ static inline int handle_responder(struct ibv_wc *wc, struct mlx5_cqe64 *cqe, if (err) return err; - wc->byte_len = be32toh(cqe->byte_cnt); - switch (cqe->op_own >> 4) { case MLX5_CQE_RESP_WR_IMM: wc->opcode = IBV_WC_RECV_RDMA_WITH_IMM; diff --git a/providers/mlx5/qp.c b/providers/mlx5/qp.c index 1d5a2f9..5975755 100644 --- a/providers/mlx5/qp.c +++ b/providers/mlx5/qp.c @@ -317,7 +317,7 @@ static uint8_t wq_sig(struct mlx5_wqe_ctrl_seg *ctrl) } #ifdef MLX5_DEBUG -void dump_wqe(FILE *fp, int idx, int size_16, struct mlx5_qp *qp) +static void dump_wqe(FILE *fp, int idx, int size_16, struct mlx5_qp *qp) { uint32_t *uninitialized_var(p); int i, j;