From patchwork Thu Jun 30 13:51:09 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: 9207679 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 B76B260752 for ; Thu, 30 Jun 2016 13:51:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8D05285BA for ; Thu, 30 Jun 2016 13:51:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D7722865F; Thu, 30 Jun 2016 13:51:47 +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 581322867D for ; Thu, 30 Jun 2016 13:51:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932131AbcF3Nve (ORCPT ); Thu, 30 Jun 2016 09:51:34 -0400 Received: from mail-bn1on0094.outbound.protection.outlook.com ([157.56.110.94]:5012 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752017AbcF3Nvb (ORCPT ); Thu, 30 Jun 2016 09:51:31 -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=y+W8qeh+53tM877B2mAuMh8VRDQ3u5nib3GwiRKuNIY=; b=gGSoe5N+Q5rQeuagbs9h29huFrepcu2+ThPuXt0IuM2vwRn4PSZ6shmzWKvmYZuq+NKmb2k9Bqsc1kmkncbBzIRcHOLu966yFHp1e0NfRR/zrur4jKJE1ipGY5rdwr7kya23ursMuWDUvACRYIJsupS5AUCl8y1gaM1LRc0ASFs= Received: from CY1PR0201CA0036.namprd02.prod.outlook.com (10.163.30.174) by BLUPR02MB504.namprd02.prod.outlook.com (10.141.82.26) with Microsoft SMTP Server (TLS) id 15.1.523.12; Thu, 30 Jun 2016 13:51:25 +0000 Received: from BL2FFO11OLC005.protection.gbl (2a01:111:f400:7c09::185) by CY1PR0201CA0036.outlook.office365.com (2a01:111:e400:58b9::46) with Microsoft SMTP Server (TLS) id 15.1.528.16 via Frontend Transport; Thu, 30 Jun 2016 13:51:25 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BL2FFO11OLC005.mail.protection.outlook.com (10.173.160.91) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Thu, 30 Jun 2016 13:51:23 +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 89.DE.03838.FA225775; Thu, 30 Jun 2016 06:46:23 -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; Thu, 30 Jun 2016 06:51:12 -0700 X-AuditID: ac160c71-a17ff70000000efe-6c-577522afea73 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 35.6B.03875.EC325775; Thu, 30 Jun 2016 06:51:12 -0700 (PDT) Subject: [PATCH v2 4/5] IB/srpt: Simplify srpt_queue_response() To: Doug Ledford References: CC: Christoph Hellwig , Sagi Grimberg , "Nicholas A. Bellinger" , Parav Pandit , Laurence Oberman , Steve Wise , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <2d654d9f-8d0e-c26b-c2ab-612d7468f5de@sandisk.com> Date: Thu, 30 Jun 2016 15:51:09 +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: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeLIzCtJLcpLzFFi42JZI8azSHe9Umm4Qfs7C4uX5z+wWqxcfZTJ 4tmhXhaL8x9eMVm0rT7DaNF4ycBi3ev3LBb/1nazOHB47Jx1l93j/L2NLB73tx9h8th9s4HN 49Hzc4we7/ddZfP4vEkugD2KyyYlNSezLLVI3y6BK+Ps3WuMBXN5Kp733WZpYJzB1cXIySEh YCJxfdMTVhBbSGAuk8Sir5FdjFxA9g5GiYvPbrHAFG1eepsVIrGUUaLp6AEmkISwgL3Ew22T wWwRATWJTa8WsUNMspOYs2EuE0gDs8B6JonuKcvZQBJsAkYS397PBJvKC1T07NE7sDiLgKrE 3pNHwOKiAhESvb+WQNUISpyc+QTM5gRatmPnMqArOICGakqs36UPEmYWkJfY/nYOM8guCYG7 rBIrpt9mgThCXeLkkvlMExiFZyEZNQuhfRaS9gWMzKsYxXIzc4pz01MLDE30ihPzUjKLs/WS 83M3MUKiqXAH4+vb3ocYBTgYlXh4HZhLwoVYE8uKK3MPMUpwMCuJ8L6SLw0X4k1JrKxKLcqP LyrNSS0+xCjNwaIkznsx+mOYkEB6YklqdmpqQWoRTJaJg1OqgZHz6H9V97ozs7r2r6+4XpDi fvr8uXu5pqlrNHYGslbxvKr7XnXudvKUiVuZSvVZQh4oL2KeEfVT4Dyns/NZy7/p77W/TTac c+yFW/fRqn2OciLmPxdo9z7gvrXom4bd5B0MDekFmdUr0zex/6txt6/Y8WF+naZjRkEdE//n Wxsiu7mfGX8vblBiKc5INNRiLipOBABcOwNJogIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnluLIzCtJLcpLzFFi42Lh2siRontBuTTc4PcbcYuX5z+wWqxcfZTJ 4tmhXhaL8x9eMVm0rT7DaNF4ycBi3ev3LBb/1nazOHB47Jx1l93j/L2NLB73tx9h8th9s4HN 49Hzc4we7/ddZfP4vEkugD2KyyYlNSezLLVI3y6BK+Ps3WuMBXN5Kp733WZpYJzB1cXIySEh YCKxeelt1i5GLg4hgcWMEts/r2QGSQgL2Es83DaZCcQWEVCT2PRqETuILSRgJzFnw1wmkAZm gfVMEn2fH4AVsQkYSXx7P5MFxOYFKnr26B0biM0ioCqx9+QRsLioQIRE768lUDWCEidnPgGz OYGW7di5jBXEZhZQl/gz7xIzhC0vsf3tHOYJjHyzkLTMQlI2C0nZAkbmVYxiuZk5xbnpmQWG RnrFiXkpmcXZesn5uZsYwUHNGbWD8fpE80OMTBycUg2MvnHfYx53ayf/jbje1bjn/d31WfcT WmLDl+51ltUqyCplleRcNE2/0EnNpzLqeXF2YkafQK1d0l9Ow3mr53nx8qh9/ZE89+wkadvQ FdxNaTVuUhOnhSSnKYWlf4q59L3z4VplxwvXPc5Hndh2b/XP2Fla2ZNWlp5S8ejs8lqfF1U0 Xyak7JcSS3FGoqEWc1FxIgARmgClGgIAAA== X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(189002)(199003)(81156014)(6806005)(8676002)(76176999)(69596002)(19580395003)(19580405001)(86362001)(2906002)(31696002)(230700001)(97736004)(4326007)(189998001)(7696003)(83506001)(54356999)(64126003)(50986999)(68736007)(81166006)(110136002)(586003)(33646002)(8936002)(106466001)(47776003)(305945005)(4001350100001)(65956001)(36756003)(2950100001)(77096005)(92566002)(356003)(23676002)(31686004)(11100500001)(65806001)(2270400002)(87936001)(7846002)(5003600100003)(50466002)(229853001)(53416004)(65826006); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB504; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC005; 1:Ukgm3lYhulbGaY9ozf89luJT1Mpk/SEjgul5XWrmdG2llUE9JHRy2WWnOpQwlPwS4rD8DRUhFL0fieM6XQJnIuliOxLmVM1pPbi/hEtND0IvJVrUC8cAu/g6DBVrjc+ZqOTJ70y74xOzMU72sfkJcP+7nUFF4OCM+kt3Q2koMsVUGMNSuGM7ehO7LwmydWxUuS9VOCDUZ5GtUM8LxWDPFifmjWK08ZeEaGedZdkV88CFemHIGIegKworyZJBr9IdJP5GHQYhDbyvZyQzS/2V8D2Uu8BNnwg6CPmmnQ4Bsl4Dutw43ndh95CV6XJorDQ6YEREs8ARNYO03/C540XSbJXjXCiqEANwcDoPsawzrH9mk645lT4mEn/GZw8SUfaiBsvaQrqAUC68Xpyv5ARmJBUQ/QbS4+aR6Y0rUsO3Xec9OKCXT+6RTesaJjH8uHT5QqAnFXBlnYnLrtpsUeX+eJO7BvUIiZ9nivwzNd1xnLwymkY4MhJi2FlKnsLvx8fAH24V4A3ijIIu+jyQX1EPwQ== X-MS-Office365-Filtering-Correlation-Id: 44f7cfb1-a017-4fb3-5093-08d3a0eda0a1 X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB504; 2:6UIi8nYhYu8l/IXynLnqF2KzS7MozhdryqUrTVo3qz8H0ZgpVCfvVO9lp2Uoe97FVrHP1ukb1vXytWccEBqKt+1NZ5LKRLkkJ+UZ1Rw8h2MkDwC9QxUhjBvlzBMUN+goG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3MBvbwwb5BIf8uhX7wLi2WgB13SGeeXY66f5UnfoB+US2ZqnRNuEfydj7VETQGAo1Da39OeyzEetcIe5541rjuiO4dCnJojtp8OwmIwwNnIfMrd6JENVyKmjgHb2B3wIU5XnOF2FkQ6POhNQqYPVKhW+iv4ljswfBMkhT68OGpnoAx69J5vefDX9qWuaHb09X5+XEJaBW31xIaN8LmoT5qDn3x8R5xrtRo9vLxsR02nNkSQZB0Y5Hx7wbC/Ejy+Jodh6aIyQAy5sXWIr2Evu4XEYEJQ24bLEcoeOiz+gaEym0MbFpjaP6AB3Dj X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(10201501046)(3002001)(6055026); SRVR:BLUPR02MB504; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB504; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB504; 4:9rZHbhzc2ZrHGd6t1Kr+gr2hQfudybQ1Znt93DPFoZtRjhATOhwrk8nf3bflu52fNiMsw6jaUJu8hpNDQTH42Zr5FPwBpKPd6dDQuKthfXXPeXAr2bhcuFstr3kk1+wfW8EbBESIzKAsM2WpebDdWVfCiBjtVQV1I69S7sicK46m8XLW3UxwRJEdIy9WDKJjqjXdLRd+WRUOQFFgb0j/9b4D8pgCF7HnaoSy/4OSKEJj1czj5dAraFaH73Tsxb5byhdW9yCLvxXDf6QAb1JNg3EtnRZIcVBNWtuJXH/MeKBmrlqZmPyi6nXExwqrognURC00AYCw4s2YWmTt61/bGETJrEpwH8jjtozQV30tij8sBvr8apPMIXASp9lr9GnX2MhmGiwTaWxNgmhgiEVxg/xTH3lshrmQGs187knjZa1XNngrzrsSeCf1dSoblpbZ+7KLDuAtLmujHNyYFaNR6A== X-Forefront-PRVS: 0989A7979C X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjAyTUI1MDQ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aNrCtYv0ce7pLpxkWJA/3fzp1k/IC1BMVhcIwAS4kF1egLFZB8hZNAE4i7hN8RiWy/OdBIDNTSsErGSDUUk4lstsD0aaX1JAFrQwEkM7snwibH X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2016 13:51:23.5768 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB504 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 Reviewed-by: Christoph Hellwig Cc: Sagi Grimberg Cc: Nicholas Bellinger Cc: Parav Pandit Cc: Laurence Oberman --- 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 9a3b954..dfa23b0 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2262,7 +2262,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; @@ -2303,11 +2303,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)