From patchwork Sun Jan 10 11:19:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 12009033 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 075E6C433DB for ; Sun, 10 Jan 2021 11:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8C0F22E02 for ; Sun, 10 Jan 2021 11:20:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726288AbhAJLTs (ORCPT ); Sun, 10 Jan 2021 06:19:48 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:18091 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726069AbhAJLTr (ORCPT ); Sun, 10 Jan 2021 06:19:47 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 10 Jan 2021 03:19:07 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 10 Jan 2021 11:19:06 +0000 Received: from r-nvmx02.mtr.labs.mlnx (172.20.145.6) by mail.nvidia.com (172.20.187.13) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Sun, 10 Jan 2021 11:19:04 +0000 From: Max Gurtovoy To: , , , , CC: , Max Gurtovoy , Israel Rukshin Subject: [PATCH 1/3] IB/isert: remove unneeded new lines Date: Sun, 10 Jan 2021 11:19:01 +0000 Message-ID: <20210110111903.486681-1-mgurtovoy@nvidia.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610277547; bh=rc1VKP2/YGZ8ioiFUhEambBaOc8oB8trEDLsWHSG2MM=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type; b=g7qx8holiaU+uFN6VLMnzc6+v7PFxl61R8UOn1dbOwKOyEkM7CcaQJRRFv1zyPagm 7uthoy3AF2VGV/B6MlG09acaWAAu2dFTrw5eUQMkH2WEigqfZU/I1LCxESSr8Zli2C BeSFov8cYXe4vb7v5Je5ePKLmyXHXFFEHqWqYx4jO8WBuxaVUwrSa1mTBxvPT+s82Y twg6MyT9vd5OsMY3AojVIS5PG8he/T5BO5Z8i+SejqBA8OT00fNp+/3Vwfgjmkgbvj 5ZCVOdDj9BkkW+nvSjO2pgRyqPQQBAGcV1fkqRWYo2saYmJB6wdCcs+etQ1ZJVBF4+ aAOUJt2khgZjA== Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The Linux convention is to have only 1 new line between functions. Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/isert/ib_isert.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 2ba27221ea85..5958929b7dec 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -71,7 +71,6 @@ static int isert_sg_tablesize_set(const char *val, const struct kernel_param *kp return param_set_int(val, kp); } - static inline bool isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd) { @@ -79,7 +78,6 @@ isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd) cmd->prot_op != TARGET_PROT_NORMAL); } - static void isert_qp_event_callback(struct ib_event *e, void *context) { From patchwork Sun Jan 10 11:19:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 12009031 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11C6FC433E0 for ; Sun, 10 Jan 2021 11:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D480E22EBF for ; Sun, 10 Jan 2021 11:20:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726365AbhAJLTx (ORCPT ); Sun, 10 Jan 2021 06:19:53 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:19510 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726069AbhAJLTu (ORCPT ); Sun, 10 Jan 2021 06:19:50 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 10 Jan 2021 03:19:10 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 10 Jan 2021 11:19:09 +0000 Received: from r-nvmx02.mtr.labs.mlnx (172.20.145.6) by mail.nvidia.com (172.20.187.13) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Sun, 10 Jan 2021 11:19:07 +0000 From: Max Gurtovoy To: , , , , CC: , Max Gurtovoy , Israel Rukshin Subject: [PATCH 2/3] IB/isert: remove unneeded semicolon Date: Sun, 10 Jan 2021 11:19:02 +0000 Message-ID: <20210110111903.486681-2-mgurtovoy@nvidia.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20210110111903.486681-1-mgurtovoy@nvidia.com> References: <20210110111903.486681-1-mgurtovoy@nvidia.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610277550; bh=TNSYOmBkaDlRr0JXmtL0QACJKjSaAgcBwquzdgSX4ss=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type; b=U2tB0wAjEgzo0bPdtWuonFnSwOuwXWuLl7MJ8d+HOWNcuHa0KEc4DGXN6d7myhW28 5NTIL8UjcJbbUVdcjU8isgOf+REeofs/0ULvrcM5aXdD0IxkS3RhKV+5XZNSHdxIYF fyEKV6BS3l3Tg9HvwLqxgAqRTxWLxN+MTjtrVvoy6m/z9itV96J62DTK3ONCCx5K04 KWlA2xzCcMPMFLMBi1nvkI4uN8PTHflF7vWuLOFN6qC3KgmhnWKMuhC2TK6UYlSCDH 2hZQJgnRYp/W6rIJIi8G5xPTSAK6GS8nF9704+J3XGytM9+eGM3lqgfL8n69oqAWGV fDukHXlFgRTJw== Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org No need to add semicolon after closing bracket. Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/isert/ib_isert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 5958929b7dec..96514f675427 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -1991,7 +1991,7 @@ isert_set_dif_domain(struct se_cmd *se_cmd, struct ib_sig_domain *domain) if (se_cmd->prot_type == TARGET_DIF_TYPE1_PROT || se_cmd->prot_type == TARGET_DIF_TYPE2_PROT) domain->sig.dif.ref_remap = true; -}; +} static int isert_set_sig_attrs(struct se_cmd *se_cmd, struct ib_sig_attrs *sig_attrs) From patchwork Sun Jan 10 11:19:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 12009035 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C50BC433E6 for ; Sun, 10 Jan 2021 11:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF89D23108 for ; Sun, 10 Jan 2021 11:20:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726215AbhAJLTx (ORCPT ); Sun, 10 Jan 2021 06:19:53 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:14196 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbhAJLTx (ORCPT ); Sun, 10 Jan 2021 06:19:53 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 10 Jan 2021 03:19:12 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 10 Jan 2021 11:19:12 +0000 Received: from r-nvmx02.mtr.labs.mlnx (172.20.145.6) by mail.nvidia.com (172.20.187.13) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Sun, 10 Jan 2021 11:19:10 +0000 From: Max Gurtovoy To: , , , , CC: , Max Gurtovoy , Israel Rukshin Subject: [PATCH 3/3] IB/isert: simplify signature cap check Date: Sun, 10 Jan 2021 11:19:03 +0000 Message-ID: <20210110111903.486681-3-mgurtovoy@nvidia.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20210110111903.486681-1-mgurtovoy@nvidia.com> References: <20210110111903.486681-1-mgurtovoy@nvidia.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610277553; bh=eHtTMbj7+dvsMlCWg5Mtv6YvpESEtWlnitN6xQ36aIE=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type; b=l149FmJMJBoAuO44tdq1aJ+nXv/8irQZlZ//wJC3c75vkm0hkU209yLBOKGXv11Pk fumWyi+3rcmWmAg605ggvTcs8letHXy33UhEizJxgIlH3PXPtW0v1FUXBUyLcLfZju 6kj2J4jVNYknhH8aW3kOtPu68sw6Wq3W0qfmleSEv5G+WZt6Xem1OMF7GcU+SxSIwt XHN2xSFfuuuE1ZnMDduINSSzrNGEVa0t683f8HsrBuPvJEFfK3ZC0d/5bgEad994F9 ogg/Z3VIdwVwBXE/q+i5aVt6fmXGPiRfVmL1c9WQwjEPxEJXrrShZMjEHZJmA0vYm/ q2Dh7AsqRI1eQ== Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Use if/else clause instead of "condition ? val1 : val2" to make the code cleaner and simpler. Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg --- drivers/infiniband/ulp/isert/ib_isert.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 96514f675427..7305ed8976c2 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -230,8 +230,10 @@ isert_create_device_ib_res(struct isert_device *device) } /* Check signature cap */ - device->pi_capable = ib_dev->attrs.device_cap_flags & - IB_DEVICE_INTEGRITY_HANDOVER ? true : false; + if (ib_dev->attrs.device_cap_flags & IB_DEVICE_INTEGRITY_HANDOVER) + device->pi_capable = true; + else + device->pi_capable = false; return 0; }