From patchwork Tue Jun 28 11:29:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9203017 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 223476074E for ; Tue, 28 Jun 2016 11:44:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11B2B285F7 for ; Tue, 28 Jun 2016 11:44:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05F04285FC; Tue, 28 Jun 2016 11:44:46 +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 41230285F7 for ; Tue, 28 Jun 2016 11:44:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751158AbcF1Loo (ORCPT ); Tue, 28 Jun 2016 07:44:44 -0400 Received: from mail-bl2on0092.outbound.protection.outlook.com ([65.55.169.92]:22554 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750753AbcF1Lon (ORCPT ); Tue, 28 Jun 2016 07:44:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=soZIq5PZ6PWrB4pV9Unfau8AGSwJq/auyj8KLyRqvZc=; b=Xzdn+GNzIa8rakm4piYTO04zK+WlcHnku5xuX19eaVVgGPcgj/TsmvF+mQ5sHyPDmVsqZsgUgcoZXS47dKYvjUXoTBql0NjSF3WGfrxtFflgQdRGpQojLtyV1Nmz5/POc2RF16xdVBMfnJ6j4v5QApzaG4CbTIDRrRh82s8htYA= Received: from BY2PR02CA0118.namprd02.prod.outlook.com (10.163.44.172) by BN1PR0201MB0803.namprd02.prod.outlook.com (10.160.170.148) with Microsoft SMTP Server (TLS) id 15.1.523.12; Tue, 28 Jun 2016 11:29:53 +0000 Received: from BY2FFO11FD004.protection.gbl (2a01:111:f400:7c0c::166) by BY2PR02CA0118.outlook.office365.com (2a01:111:e400:5261::44) with Microsoft SMTP Server (TLS) id 15.1.528.16 via Frontend Transport; Tue, 28 Jun 2016 11:29:52 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BY2FFO11FD004.mail.protection.outlook.com (10.1.14.158) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Tue, 28 Jun 2016 11:29:52 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [172.22.12.162]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id FF.80.03023.F5E52775; Tue, 28 Jun 2016 04:24:15 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.279.2; Tue, 28 Jun 2016 04:29:44 -0700 X-AuditID: ac160c69-6db3098000000bcf-d3-57725e5f69d9 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 84.F5.03875.6AF52775; Tue, 28 Jun 2016 04:29:44 -0700 (PDT) Subject: [PATCH 5/5] IB/srpt: Simplify srpt_queue_response() To: Doug Ledford References: <419391ba-0c39-11ce-f249-84b428dc73d5@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Nicholas A. Bellinger" , Parav Pandit , Laurence Oberman , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <8457ca4e-0359-687f-e078-76979adf54c3@sandisk.com> Date: Tue, 28 Jun 2016 13:29:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <419391ba-0c39-11ce-f249-84b428dc73d5@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeLIzCtJLcpLzFFi42JZI8azSDc+rijcYOpCFYuX5z+wWqxcfZTJ 4tmhXhaL8x9eMVm0rT7DaNF4ycBi3ev3LA7sHjtn3WX3OH9vI4vH/e1HmDx232xg83i/7yqb x+dNcgFsUVw2Kak5mWWpRfp2CVwZXTda2Aum8FS8+DKDpYGxn6uLkZNDQsBEYvPfuexdjFwc QgJzmSQ+L1rCCuHsYJRo/HuDDaZq2+YrbBCJpYwSFxbsZQJJCAvYSJzY/BnMFhFQk9j0ahE7 iC0kYCfxpu07M0gDs0Azk8Su3+fAitgEjCS+vZ/JAmLzAhWta+wFKuLgYBFQlfjwNw0kLCoQ IdH7awlUiaDEyZlPwGxOAXuJw6dfsoGUMwtoSqzfpQ8SZhaQl9j+dg7YKgmBk6wS13bMYoa4 QV3i5JL5TBMYhWchGTULoX0WkvYFjMyrGMVyM3OKc9NTCwxN9YoT81Iyi7P1kvNzNzFCIidz B+PdJ96HGAU4GJV4eHfUFYYLsSaWFVfmHmKU4GBWEuGVjC8KF+JNSaysSi3Kjy8qzUktPsQo zcGiJM7rdu9LmJBAemJJanZqakFqEUyWiYNTqoExZNaNqKesmkp3p1keK0mNVtZ7Vcv4nOfx 5pKkwFhXyzVvekLFTXeKzPt27dc9c8fPaYeN/fbPuXSisvuns8xO3sKQ1XMX3L2weFXU4uuh N0vNZlecDrRe+e6fh5KZZtWpDUuyv87ZWtm14pBy2inraS28Sx29A/i/1seEqs8JNz1Rtfis i+ATJZbijERDLeai4kQAYGCEPpgCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNJMWRmVeSWpSXmKPExsXCtZEjRXdFfFG4waqVbBYvz39gtVi5+iiT xbNDvSwW5z+8YrJoW32G0aLxkoHFutfvWRzYPXbOusvucf7eRhaP+9uPMHnsvtnA5vF+31U2 j8+b5ALYorhsUlJzMstSi/TtErgyum60sBdM4al48WUGSwNjP1cXIyeHhICJxLbNV9i6GLk4 hAQWM0oc3dfBDJIQFrCROLH5MxOILSKgJrHp1SJ2EFtIwE7iTdt3sBpmgVYmifavMiA2m4CR xLf3M1lAbF6gmnWNvUA1HBwsAqoSH/6mgYRFBSIken8tgSoRlDg58wmYzSlgL3H49Es2iJHq En/mXYIaLy+x/e0c5gmMfLOQtMxCUjYLSdkCRuZVjGK5mTnFuemZBYZGesWJeSmZxdl6yfm5 mxjBwcsZtYPx+kTzQ4xMHJxSDYxiWxV4/7/bPf23dw//8mOXz57m6D0//Yfjq6TQaiGLJ07u mt+W/zD6lvTzcn5h0Hk/bhcLkchCjWsMOY5aFQabX4aKKBy5fauykFPJIL524eQo38i5ElyJ wZ883s8OY+QpaWW5fVvpn9hlmZPipucrO/cHnwl/nM3+1cpgyt0OhpzWey6O3kosxRmJhlrM RcWJABc0uJgOAgAA X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(7846002)(33646002)(50466002)(92566002)(47776003)(11100500001)(110136002)(2906002)(229853001)(54356999)(5003600100003)(8936002)(53416004)(230700001)(87936001)(77096005)(189998001)(76176999)(50986999)(31686004)(23676002)(65956001)(19580405001)(86362001)(19580395003)(64126003)(65806001)(106466001)(2950100001)(81166006)(81156014)(356003)(2270400002)(8676002)(305945005)(83506001)(6806005)(31696002)(36756003)(4001350100001)(97736004)(4326007)(69596002)(7696003)(68736007)(586003)(65826006); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0201MB0803; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD004; 1:aG/gVsb/eQJr3oBTjq9rzUjpIQ+ZoI9AG7P6rFyUiih/8Vg6LSpxE+4T2teY+jjkdldeIMMF/LeVy0hrmsLtZuHbR9fY+kZbtPcwJc9nTUX8jRF7zbPQcVgwjRcgEgoo9yKtpX4rIDCFN2V4uZiIuOxk704nKiSeHIAbUmDnC6+vp/DAy62jwXmrct2+s341scaZ6Ba6yuX2q2opieb+Ku6Xehh5Cojr0OHoiOOcayFZKqcHBJmgZZhiwYkQFicEIpDv2Urzg1oLmqTD00mDQFn9JSpZQ+ANU+Qt3HKc+Kzn2R987UleQSgx38503L5mB/hx3eXt3uqiUDrhvEpeKIUtc1D4UDI3hwk6V9gNkopCK7/F7IQJ2HQy20bCIYRRgvCymTplU300FB3pNBuBrTHUVs6LdWjsUC8+TRknY0SfcTRJWCm+QnFK91/Cf3y5hwzZHnqDECQiFc8HbmUmmY+xVaMn1qDHPPYx8F2lbIE= X-MS-Office365-Filtering-Correlation-Id: e30972cc-fa08-4634-837f-08d39f4785f5 X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0803; 2:xdWwVazQYCjPQTvkrHn7C1xH3CVAIzD2Hy7Ae/f995CWvtNoIRJp0F9LGmInqEtPVvypNLZav7YurHl+0la0XUOklH8HXfegjU3ci8KmNthk0Tg5/aFTj13MIybxjFo69SzquAkysK7Tc/F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BIR3ynDKOVg2//uOgymgYdVMXf432moeCe//ywhwpPZni0oSo45hraAvMTto7Ijc+rVwb+GsROd92AHBaPBxL44nAgy46nzOHfmUNwLE60ivaVCA6p7Ph34wbHm4oADRhKviaNzD1NuUyb6lsp6Wnn0ddX/EwgfsjzsmkGHXvaCEzLYIwasn6riec/RPP4/BQ8ajgxblEwwLFFjNGrdk9G7YMNw+dsEe2kj+64Je6SWyjf82QjcvndNZS7CKzWfE7s28IzAp4SPxFY/kgkMBkl+zAdul5lpB2CDBtYbo1n6gdB4gRG X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(3002001)(10201501046)(6055026); SRVR:BN1PR0201MB0803; BCL:0; PCL:0; RULEID:; SRVR:BN1PR0201MB0803; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0803; 4:hm5LDn9UPoeHsZVUbVLHiGAZE4DngL9dP1Gi281BqRaaiKCbh7+UybJ3YSG3gF+l5cMjhL3VlM78EAYjg3F7U3+hVhZMm9nsD+crSfbaQktrjd7KYSEsSUUfr8vuu7d5ghA2DBKViXaE2CcwMfV4jrWg8eQKS4AnM/AXolSjRy5FPYqCvvZii27ECkHdnc1+AOuLPQzE5SIU6kLeP9eIdBjb7LOqQHH3Isdwbi6c52lmZ1m29BzhTvZzhlTtkaXeKn/o9SVkEaKhadpf7nmOPFKZ567qyYMYEMsIILTaaiSqVOkKTVNHmtpZz4QmWvyeiVz0z9wJ0yVBjRwlf0m2G8JlwnQwxbSDw9XmJT6SJlyNk3edX++nBnmuTX3YvCHis7KdPURtsmdmcdAiFNaK57VzfG1SUTzM0kiltA+pWt5d8O11mVpeMLE70jcYJYvT9vCIzhKY0L9oOSit9UopTWEzeC04MkL66e5KeEhFI2Q= X-Forefront-PRVS: 0987ACA2E2 X-Microsoft-Exchange-Diagnostics: =?utf-8?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cGAjhKs+SO4RTMMXOPU/OjqIyNHaaUoxhhlkPGIiX3bU3VnFUKYF2qpXE+UM9JycPJViSfdsc+jC+PoqTfyq8rro6OXN6eFn7q9+IQNVpgFvMPlvmP96lWA6sQewK71q3o74ue+TuDSeSe5iUzAGSNyINvLNna1IOANJLPGOx8wy/VZ+ X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2016 11:29:52.7078 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0201MB0803 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 Initialize first_wr to &send_wr. This allows to remove a ternary operator and an else branch. This patch does not change the behavior of srpt_queue_response(). Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Nicholas Bellinger Cc: Parav Pandit Cc: Laurence Oberman Reviewed-by: Christoph Hellwig --- drivers/infiniband/ulp/srpt/ib_srpt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 6314d10..41d1159 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2272,7 +2272,7 @@ static void srpt_queue_response(struct se_cmd *cmd) container_of(cmd, struct srpt_send_ioctx, cmd); struct srpt_rdma_ch *ch = ioctx->ch; struct srpt_device *sdev = ch->sport->sdev; - struct ib_send_wr send_wr, *first_wr = NULL, *bad_wr; + struct ib_send_wr send_wr, *first_wr = &send_wr, *bad_wr; struct ib_sge sge; enum srpt_command_state state; unsigned long flags; @@ -2313,11 +2313,8 @@ static void srpt_queue_response(struct se_cmd *cmd) struct srpt_rw_ctx *ctx = &ioctx->rw_ctxs[i]; first_wr = rdma_rw_ctx_wrs(&ctx->rw, ch->qp, - ch->sport->port, NULL, - first_wr ? first_wr : &send_wr); + ch->sport->port, NULL, first_wr); } - } else { - first_wr = &send_wr; } if (state != SRPT_STATE_MGMT)