From patchwork Thu Jul 21 20:04:06 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: 9242443 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 EEC9660574 for ; Thu, 21 Jul 2016 20:04:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E04B927A98 for ; Thu, 21 Jul 2016 20:04:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D473227D85; Thu, 21 Jul 2016 20:04: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.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 3A46E27A98 for ; Thu, 21 Jul 2016 20:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753917AbcGUUES (ORCPT ); Thu, 21 Jul 2016 16:04:18 -0400 Received: from mail-sn1nam01on0040.outbound.protection.outlook.com ([104.47.32.40]:63600 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753877AbcGUUER (ORCPT ); Thu, 21 Jul 2016 16:04:17 -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=uiAQNtinlbwX3F4UJvhyvtIcd4FAKNsm92BKobp0w+I=; b=hU2DkKc27M/diRFWbOyv0KWzoZB9JnyCQmTPScr/Q2WAkQH6vYMgm220MN3zOOslkCIZEEiyK1xEHmsreMgI5VuLCiEcyIu0uByBc1yLSt53NF3IS6Bz23EmnyHrZUTInrICX1cT1DmobeNCqNHApdh/FpbpH7D9Zmy8SqxvnE4= Received: from BLUPR0201CA0021.namprd02.prod.outlook.com (10.163.116.31) by MWHPR02MB2623.namprd02.prod.outlook.com (10.168.206.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.10; Thu, 21 Jul 2016 20:04:12 +0000 Received: from BL2FFO11OLC004.protection.gbl (2a01:111:f400:7c09::135) by BLUPR0201CA0021.outlook.office365.com (2a01:111:e400:52e7::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.10 via Frontend Transport; Thu, 21 Jul 2016 20:04:11 +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 BL2FFO11OLC004.mail.protection.outlook.com (10.173.161.188) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Thu, 21 Jul 2016 20:04:11 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [172.22.12.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 40.5B.03019.31921975; Thu, 21 Jul 2016 12:57:07 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.301.0; Thu, 21 Jul 2016 13:04:06 -0700 X-AuditID: ac160c69-937c998000000bcb-c2-5791291362c8 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id B2.B3.03606.6BA21975; Thu, 21 Jul 2016 13:04:06 -0700 (PDT) Subject: [PATCH v4 4/5] IB/srpt: Simplify srpt_queue_response() To: Doug Ledford References: <75fc8647-16a6-5a89-400f-f5f418a8d6eb@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Steve Wise" , Parav Pandit , Laurence Oberman , "Nicholas A. Bellinger" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <8349ea63-5333-0d44-8591-0d77ab6f756f@sandisk.com> Date: Thu, 21 Jul 2016 13:04:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <75fc8647-16a6-5a89-400f-f5f418a8d6eb@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeLIzCtJLcpLzFFi42JZI8azSFdYc2K4weR7MhYvz39gtVi5+iiT xbNDvSwW5z+8YrJoW32G0aLxkoHFutfvWSz+re1mceDw2DnrLrvH+XsbWTzubz/C5LH7ZgOb x6Pn5xg93u+7yubxeZNcAHsUl01Kak5mWWqRvl0CV8bj9x9ZCh7xVLxcfIy1gfEGVxcjJ4eE gInE1UMtrF2MXBxCAkuZJLZPvMAM4exglNj+dikjTNW9u1MZoaoYJd4tWAPUwsEhLGAvMfsq C0iNiICaxKZXi9hBbCEBO4lTG7awgNQzC6xnkviz7DZYEZuAkcS39zPBbF6gonuP+sEWsAio Spxt7AGLiwqESUy7+5YdokZQ4uTMJ2BxTqBd29tbWUD2MgtoSqzfpQ8SZhaQB7pzDtjREgJX WSVuf21hgThCXeLkkvlMExiFZyEZNQuhfRaS9gWMzKsYxXIzc4pz01MLDE31ihPzUjKLs/WS 83M3MUKiKXMH490n3ocYBTgYlXh4TzydEC7EmlhWXJl7iFGCg1lJhHc6MBaFeFMSK6tSi/Lj i0pzUosPMUpzsCiJ87rd+xImJJCeWJKanZpakFoEk2Xi4JQCRsazooN3rCZqKCgeK7b3XPSh /O96wemHFjHzTra6cfhAHPeGqZMka5d0b+YIbLnidLxj/+0Y8QdvvK6eVZ/b6jHzr6epJP+y rT3Mbj9KYuIUF02z/Xno/T/mLzxPxGz/uVVdenNeUWR2m+jEsCPnN8bt37T0fuxa9b0MOc/r F5xmOHyj8NwZgZNKLMUZiYZazEXFiQD54oYrogIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplluLIzCtJLcpLzFFi42Lh2siRortNa2K4wbVeCYuX5z+wWqxcfZTJ 4tmhXhaL8x9eMVm0rT7DaNF4ycBi3ev3LBb/1nazOHB47Jx1l93j/L2NLB73tx9h8th9s4HN 49Hzc4we7/ddZfP4vEkugD2KyyYlNSezLLVI3y6BK+Px+48sBY94Kl4uPsbawHiDq4uRk0NC wETi3t2pjCC2kMBiRokDG+S6GDk4hAXsJWZfZQEJiwioSWx6tYgdosRO4tSGLUBxLg5mgfVM El8mXQLrZRMwkvj2fiZYAy9Q0b1H/WBxFgFVibONPWBxUYEwiWl337JD1AhKnJz5BCzOCbRr e3srmM0soC7xZ94lZghbXmL72znMExj5ZiFpmYWkbBaSsgWMzKsYxXIzc4pz0zMLDI30ihPz UjKLs/WS83M3MYIDmjNqB+P1ieaHGJk4OKUaGC3cOS78nRYbH78kJe6ohHD85K8P1F10b3Zv 02ja5GFzZPcbncgJgaX6SY5CfkzbRPd4Xq2bsFPrzKqtqxnrk5scY6IuXZ57fLJ4qq2X3V++ 263nIg33mNye9bSlfAvr4xqemNP/Yjc8ErE+b1ivZOx142jVlivfVHyie8LzLZqCfhSc5Ek/ rsRSnJFoqMVcVJwIALm8g2wYAgAA 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)(229853001)(97736004)(4326007)(4001350100001)(50466002)(64126003)(2950100001)(33646002)(23676002)(2906002)(77096005)(230700001)(2270400002)(11100500001)(36756003)(6806005)(106466001)(7846002)(305945005)(8676002)(81156014)(81166006)(110136002)(53416004)(87936001)(586003)(5003600100003)(7696003)(47776003)(68736007)(19580405001)(76176999)(50986999)(19580395003)(92566002)(31696002)(356003)(83506001)(65806001)(54356999)(86362001)(8936002)(189998001)(69596002)(31686004)(65956001)(65826006); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR02MB2623; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC004; 1:MFfdGeJM4Nvp/x9mrcdWGw4xaSU3Og4Vh8t9yZQTdQ0GVn5rES6SgqS5CnPD41Y5lUfg5B9+KrlUUeYPVCibNIXjtlqJdWJZ0jA0l5BA5g7lHmi49oZOnU3fhB44jul12RP0zIxkHSXHs9kMaHPJYIhRN7NkZWnzS0Mq5awSZazPqBI5STvC47oG+e+LYjf0ge68mUAwj6+VtT3yQYLprCQQHPrdJshWtykl6GuYahLniY44Cf5EEIAE6SQok613ECXVB0q0qEFlZb/4UjiECKftshp141srBV7+1GAN8FrenTgSgCLOKOcRIB4rH12Xg/c8iBDKyxizZMowvbSPcy0nUp8s0BbV2w7bOcSaROh9FhzGHOTR1Q0+zRJ5TNdekq+1gfIauU7I/p8E+UnFSwZEUR0xvtaRoWvIFNcyZn4gH1aBK8zw4ZOKiMVFSBUhOibtoSI4giZB/9GLO+eg/a4r9ViChuaO32fUoM51mK4= X-MS-Office365-Filtering-Correlation-Id: 05fb2ae0-46cd-4ec0-7acb-08d3b1a22ef9 X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB2623; 2:VB2BC94o09O4H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SxhcQQXVWSWwTiTb62ybI/XUt736oXzY1pCg3TdH/nX1uLyxNub2W7nIIIXLfBy2YmgUe1oefCFyXDtp4efIabTt5wHNl9UAfMJtW+4ZNLjd9jPBw4z0hMA5/XBWTJx8cBpYcQ==; 20:HIUVurf4vmhtZr9xcR92X4bS2b8Wih1oStOMI3DW19GAoIDu5iw7KLInPTzncebj8SRiH+jEOoPyUO7GGY2H8zQLUDvBQb3ZaEwdb85ttm3W7I7eORs+b+jjilxL5zcvzdH++aRFmOeeF8tGsFFeKiFcgWJJr925qjpKzssthB2+1Jj6sh0pEK5IOAUMs6yY+Q9VltiLXnLXKCRCPRa54cc/unLyRa5JXQy/HLdkKIVPOsMsL9vBLzHDfy230mFIKD8xmf3SwWBe6ckcSBeQScbMVwI+400mXKQ0XhNM3T8UOJaMqYA17iYyhIslmUp9z8r3uMlg4H+vySNNIpNAjAsLpW97Obw/xU/ObaATVPhBgSKHA5utuZ3jWJyxOFObnQpbd/4SUQFaeL/ZwgEQRsE6pr2AIJl/4BJbEyig5cegihPumWFRdMph+8iCHqhzB678c7k4EnEVpNQ6k6uUGHvnJF8yxFSHyF5Hw8+lb2G3MUghKhmWeEOLc+4h9HQw X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(3002001)(10201501046)(6055026); SRVR:MWHPR02MB2623; BCL:0; PCL:0; RULEID:; SRVR:MWHPR02MB2623; X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB2623; 4:iyvucUZ996P2jkOWIgC1PAWQWF66TjRGJ5DH03qQ1y5xYhR+Eufp6BV6VMyxYrBAL4EDTJbFk3tbxp7EALxmGeZs/tMBrvYhdZ8WrPjS65u6GKHTFYk8/ql6R1Gtznroscoo7aq5Hi1H0neMzvfcT1WBiPdXLRVpg7FjqcUDKxWqacFqteKygIZ19lxYCo4/ZDG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K7SnB5FVAHoaW5qJVmjDcL0dwED3oAMUhXpwHmaPWMpRcjwIOR9d+ShUgFfzeynf43lkZvblmY1TyUiWhgJwxBeGFYk9qiReh1nihVt5gcac SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB2623; 20:dmnMN7SL5Rwht1HbySc2mHioGwDQ6XO/2fxGIlkILAdy8YChGtGC8u5BMmEk/EBy7g5B5pmPywHPJlyU4o0F8KtzX5mOTUHaI4fDMG6ODlrBA9JV+HEPIdwp938BGPzSgcaUzFCYixDtKWwFJ5wcI18B8wQGpGVV1dVJHc8a+tAXcRVL7cg1zXaXJ4946v830ChV5/Ld/AgUoE6BpmHCxCDqjhNTkeQ0z3OU9SbFwmsqFMNgUczPWMmAEhPLz6Ks X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2016 20:04:11.2960 (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: MWHPR02MB2623 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 Reviewed-by: Sagi Grimberg Tested-by: Steve Wise Tested-by: Laurence Oberman Cc: Parav Pandit Cc: Nicholas Bellinger --- 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)