From patchwork Wed May 24 00:34:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9744745 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 CFA8D602A7 for ; Wed, 24 May 2017 00:35:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C385428867 for ; Wed, 24 May 2017 00:35:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B89482886A; Wed, 24 May 2017 00:35:45 +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,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable 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 62DF228867 for ; Wed, 24 May 2017 00:35:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965002AbdEXAfn (ORCPT ); Tue, 23 May 2017 20:35:43 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:6364 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760443AbdEXAei (ORCPT ); Tue, 23 May 2017 20:34:38 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="122517438" Received: from mail-sn1nam02lp0016.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.16]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 08:34:31 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2cP/GePpwLA1liTgwji4D0wksSjNn3ziH6vcThZn6kk=; b=lMTxiOINuYsZCCSehQDOsxzZFwa1+XEFoNSGzULryyihiOekOzxU0iMreDUGgAvgjRuegQ9UBghsJyYJeTmQa2Mg4yss2XXOj8sutMPCCo/KLPVSPKFLM4xRL+7pEKG+ZPHTeUnidwWi40Xf3QQQEhYeiCBvPJZ5ViG/ER7NchQ= Received: from BLUPR0401CA0012.namprd04.prod.outlook.com (10.162.114.150) by CY4PR04MB0505.namprd04.prod.outlook.com (10.173.190.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Wed, 24 May 2017 00:34:29 +0000 Received: from CO1NAM04FT046.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::200) by BLUPR0401CA0012.outlook.office365.com (2a01:111:e400:525a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 24 May 2017 00:34:28 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; HansenPartnership.com; dkim=none (message not signed) header.d=none; HansenPartnership.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 CO1NAM04FT046.mail.protection.outlook.com (10.152.91.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Wed, 24 May 2017 00:34:27 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.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 D7.55.19026.215D4295; Tue, 23 May 2017 17:34:27 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 23 May 2017 17:34:23 -0700 X-AuditID: 0ac94371-41ba798000004a52-30-5924d5123fad Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 8A.A3.18148.F05D4295; Tue, 23 May 2017 17:34:23 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , , "Bart Van Assche" , Christoph Hellwig , "Hannes Reinecke" Subject: [PATCH 26/31] scsi: Move the code for clearing private command data into scsi_dispatch_cmd() Date: Tue, 23 May 2017 17:34:15 -0700 Message-ID: <20170524003420.5381-27-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170524003420.5381-1-bart.vanassche@sandisk.com> References: <20170524003420.5381-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCLMWRmVeSWpSXmKPExsXCddJ5ka7wVZVIg7NvOC0WvNnLZrFy9VEm i439HBZ7b2lbdF/fwWax/Pg/Jgc2j2mTTrF57L7ZwObx8ektFo/1W66yeHzeJBfAGsVlk5Ka k1mWWqRvl8CVseZGE1PBT86K2+famRsYZ3N0MXJySAiYSLQdmsDcxcjFISSwlEli9fZGdghn G6PEno52JpiqrTdPQFVtZJTY2nucDSTBJmAk8e39TBYQW0SgUOLStg5GkCJmgU2MErem7gfr FhZIlWi5cYkdxGYRUJX48PEOWDOvgL3EiRWnWCA2yEuc3bKTGcTmBIp3vZoAVM8BtM1OYtH2 CpCZEgKzWCUmfV3KDNErKHFy5hOwXmYBCYmDL16AxYUE1CVOLpnPNIFRaBaSsllIyhYwMq1i FMvNzCnOTU8tMDTRK07MS8ksztZLzs/dxAgJ+8IdjK9vex9iFOBgVOLhTXBQiRRiTSwrrsw9 xCjBwawkwrt8A1CINyWxsiq1KD++qDQntfgQozQHi5I4b5bs1AghgfTEktTs1NSC1CKYLBMH p1QD46nI2/Z8X3Zlhf/7b9h1a/4rFpnDnfpcGYaboj71Vcp1LwkMUD3Vonjk7sQbZzs+n385 0SzuCv9yk+82Td2MMtOe98W15m2cXpck+T/iOfu5eVdtst8tnVjA28+atsmbgauKae1/m0sL BAxmv3VdOWuefoZT3XWue5+MN/c//FN7dtmOI5lV55VYijMSDbWYi4oTAfyN2DJ3AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMJMWRmVeSWpSXmKPExsXCtZGTTZf/qkqkwdprChYHf7YxWix4s5fN YuXqo0wWG/s5LPbe0rbovr6DzWL58X9MDuwe0yadYvPYfbOBzePj01ssHtPWnGfyWL/lKovH 501yAWxRXDYpqTmZZalF+nYJXBlrbjQxFfzkrLh9rp25gXE2RxcjJ4eEgInE1psnmLsYuTiE BNYzSuzf+ocNJMEmYCTx7f1MFhBbRKBQ4v7p02wgRcwCmxglNrzsBUsIC6RKtNy4xA5iswio Snz4eAesmVfAXuLsxS42iA3yEme37GQGsTmB4l2vJgDVcwBts5NYtL1iAiP3AkaGVYxiuZk5 xbnpmQWGRnrFiXkpmcXZesn5uZsYIcEStYPx+kTzQ4xMHJxSDYx157xtJbmnFrVItB4olNgj uf9T48VpV3gmf8jmVxbNW7tqm7bMjZ/Oeqw7T108+/fIqxc1b1dk/C0wSGt6GpeX5KbDUlXr yMFmyP7olOWcWq+zil3PL4ZUzfv54oG9p6npLreGhs0nztxvLdEpFd993YH3gH9E2M301IM3 2pQXT19SLVuRM1uJpTgj0VCLuag4EQCvye26xgEAAA== MIME-Version: 1.0 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:(10019020)(6009001)(39410400002)(39840400002)(39450400003)(39400400002)(39850400002)(39860400002)(2980300002)(438002)(189002)(199003)(9170700003)(50226002)(8676002)(81166006)(54906002)(47776003)(36756003)(77096006)(106466001)(305945005)(53936002)(8936002)(5003940100001)(6666003)(2950100002)(50986999)(76176999)(5660300001)(50466002)(356003)(72206003)(33646002)(38730400002)(189998001)(4326008)(575784001)(1076002)(478600001)(86362001)(2906002)(48376002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0505; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT046; 1:QAi/7ulJbUxOoJdH5d7QceH6YttknPVPeZuphCU3Q3nMJUS19vIZgknkfR9jBHjv04OhF37YSfAuR0xik6iAy0UywpUWKHq9yJScOlCgqHdx0LM+pN3Id02eU4vl9LOl8GPhpNYZC3fWFYifyI3QTXk7yLI/95H3NtOdtNxN0hDiV6YLygvyUzgyqYtDh2CJcDp8LZzqCZ3qaB2ck4X5VK+Dx8UfxLbsHlylgnAzfba5cSBZK90aK0wWt9eyJl0S+0MQmmC/rBJxDw/4uMxxXoVgrVTk2z1qVhUhfsG0qG810y3B5HbRAoI6Vsr03g2Egynq3CtlyPUi6kUOXXqR3kh5zBEBY9Vu7djwBYqxnoFPCMsmVEznh8/T5PU8sSXXC/BgnHyAIi3i2m1F31cDwogpO1uXSsGJ18e2lrbG06jW0ooFTjb9TA9KYdV3VxnNnjWdpfDTrEjiV7ZbqwAG4SewfffsMzcF1ykMzteNq/ew04jfUd/YCwkEPcZ9TtjZ1OXmS8zQBvDtQmBpiAfspXNZkcZZIqnMvbzHwg2irBM= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR04MB0505: X-MS-Office365-Filtering-Correlation-Id: a7556bcb-5135-49f3-c964-08d4a23ca309 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CY4PR04MB0505; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0505; 3:6IYD+L6qjDHVSzzJTt71zomY0SpFnz63lUOheYPrLfmAb6IqP8deeqN7HTsL7o124TStP80btZwek44BFxNbEpBp1v4S41dCklFAnsGHuYIOagRBgHa46sK/gABrOTVpVjuyI+qQogSiwLuR6EpQgoNKJ1YUFll2Iuj49w5xQq/1geWmq2h3H+vXCSQzRw0NNEQFl2mCvdbloHR0mZxo29/wuSAlZVHCRx/S+qJIf7qYR7rSYfqNqIvfaRMhQ+h5nmh+e1EhgZtBA1KYCf9MjHhIPBmnWbMDCCWGVcU9dmQHy5m15wgtHjzCyOjlwlmZMCcq0Zu1hdlRfqT3cIyBW7S2oZAdDumNSoxUy5nT2pJ/vglzgdx7vItWYbcYRUADi5v0kk2Z3aMEN+uBW9Ekgx0ob4Bey/7WaM+c7drCAvSfw5gzWv83+sBdMrmEkIj15YR7PUWIYkTbQxoifQ+KgzphFFVrLLbAeyDHhF51xyFwizL/eGpXjyhgvA2Ka1l4 X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0505; 25:g8BvOmZRTWNTiAGKj9AUPi2Vp3iEosDKRDAXdaM0GWMAblyPD89o5+XzEHYV2D505Ncz2L/1zx2uovpqi6iQuwJemesyizLkF/7LTE3piDJ7kaJxFmMevlwR6MQuECbSabozsKySTOG90jwkW7OLgx59Y9PVouYf157zboNvoSkV94zNIWYaBjXupsW11Qz2ZGN7/JBdHHXoXPVtNz2jLlZJ7JPF56IrNq8Ag78hqaQ8KV+Gcc4lCHIn1mGSL71YulxnoWZzgzzXOzRlG2rHLYD4/oCT9XoFxcv6O5s9De11s9+OkKVdEpcdrkR8ohHIOFbdDZLYXgYynpZjSqf9QN8hhqaTRrjlT08gE3OeHjhM2q64eTlNcqs/g1s7CCHl3d+ui5+9O6WPi7/pF0XyB6KsC0nbidkvBMChWPbP6omTnPlSJKRQnngzEdggr0i3+AxQ6L/26V/0X52BpiWFkhU/6XECgQATa4LkUClO/Bg=; 31:8Ya3M0ldmvlVjN4XiwUfwEDGgOI0l6yyXyapshDb0QSYLaNXfmgDUsaZNDMcZR/McZPfiJVCud+ehmcDmj9hGL6ipa97Fkx1zlVD4KLg71QEz9Puwwuh3903pu4MYVusn7BR5O8KiQKBzRwr4HB+gBeZhr4nBm8LKqIFUrW7k8T/CJ2k3T5o5+O0gizCXf5qgg8KGji05gHsToDSjaXvhcIE/x/5GkeabNqR4xfVdlmIJ5NwnP0+9aTVdt6hOskOHW9eSpC5YNnaceKRXtRnhA== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0505; 20:9zVyeNNxqr8qkxeg5TMr13gujQLQFUpwvUqXdOErosxPBBeUHKjMg3F6KYTJcCeN+JEp+wLeG83RtXjy9+e4+5BYoVmcsv5OB6towHatUOEMWOL7SiBTBO1G5CyRMTknrYKTrvmpDLY+0cm5WXkMTOjYS0jH95Okqslmg1H3uqh4qCh/ZPTBsSewoYkUay4DctBdRt19PX/gOUGoLNMaYV8SF77ut/+EwMGXejSqnEWEW+69GGRxzbrS14iEHlmihLvI5tP0/Pz/9/Hs2trvmrSMB/avAVshmAh9A3+tVoNf0pbhKoNO+LQdXy4LEUmVRYT6Ugl4jJrVL2SfpT5L3LKLBLCMK+3Jg2lUkxhdq5tu0IjsAXFs7XbbtmcGrX1B+QmD+65ky4eoJNAlqB8obxMXkGamdpaER88wHLr+eYM/Q8CFQLqnC6jVQDKA4Jt1EcWjhccER2UMd4aAdSygzdlXW3PKqVBgnebgLcSotcmrpP+XmuypBmANT+0S8KAH X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(6072148); SRVR:CY4PR04MB0505; BCL:0; PCL:0; RULEID:; SRVR:CY4PR04MB0505; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0505; 4:nDMTRSFSQdVyc1rx17yNgTCc9f1UM605iK5T59bzWUUnIGeKV5cy39E2EgUhiaQHEA0Ik53fCHRbolhd2CqwL+dV5X80v7GyZUC049iO71oCdmjYIyDkvs9YoWLXH0zwQERlQCclCAidETdXCUOuroTOUiDe91cMx0WxC1lqbLbd+5R5hJXgElHUbeXoaJyMnzczRPsuETBjJT4cYGLDjYDH5Jrq6vjg3vAero3Q5zXs12tiYD1Xgxgt+3v7wYoMETbkjTOyp8RN9x4S5tyPV+qSnwbOLWCTarCLPuGkN406Pie/OcjSXsGiqqsyX03BJQ3hCGOFQUM0xbVnB69vE6r5JbkGZw5E/e8AgnWHy2njHtlI95Tkd78jgKPhLvRjvHmhcMM0K6doebPiz8HI1uJXg/9EIFt90yPiuMvpdOK6dF/4oOLoLtseaNgGHVAQAH2MLYNqCB2BTAj7PGQ1Yso8yujflpzGxvpceNnYoDm80Zqk0ndBJ4OIL4h8gGbzk+fU5qeNpWRTElgALh8bMRYvCgRDnUHS0gZ4VrJAYsIuK/AF+5XOxm6LasWMqs6MeNnMBts3yJEYu7R6o9BrAGLaWhCUH/9Ws5mkyfdrT5Y2aJLLbidDAow71l+KFLCP8IB4VnM9pj+UoZXykrrVQiPe/e6Bm7QV8JSKt2ExG5fDPKDU6Tk8rZYUS86COse2ZraKukQzsL3NQ3APBvnzaflk+5oojKSRVHQBfBUGMnymD6/mgu26QCJsvdHLlBxFYlXmjRKcy3Vuaiw7rOAFlkSXq9KL4fstOi0EuQpmJUJ9WLbz6SArNl8cAz2UazjR/1LW/zCzJG64naMXeOTQo8hNgmT1OAljMe5cACYRR0oDbZmUp+moNnwYWBxeY14W X-Forefront-PRVS: 031763BCAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0505; 23:/pxkIAF5KeyYsrlYbCMlu1xt1RSbxW+lmK9WDcz3Q?= =?us-ascii?Q?F1HrQ2BB44jqdHk1Sl6sEgmOKWgrQIY4FvFFOSGqEuPDqGd9iI52+4pgmKn4?= =?us-ascii?Q?t3r0XHUHKB/xzruiIpO3qV3H36BFR0tG/xDRDEs2pjBwVy1oyPs7zQzkou3/?= =?us-ascii?Q?bese7Tp/X4YtIRaNC+hOKlkkZSHOES0SU/BBOchDrHO/aNoZpLPwsx/0oDh0?= =?us-ascii?Q?+FbLT7M+bmpgfkjrN7f434GXvEBLKO5IaeIyOY/htaOUQhLnGtYRZ8uqf3x+?= =?us-ascii?Q?isxA4ZfOCSAECE5amPOYgjsonT4tXWADEIfXUJzPoloBwlmCpNVs6rVsh7wk?= =?us-ascii?Q?cQXw9QncPlS1azqjPU6URHU+mECz/hZW74uFnMeiVfDFVRT/AJrLLYkEFm0q?= =?us-ascii?Q?VrolT0Qdu+gXMVXjcNXQ8Snl4xL8AuVFuTcwjmCDXNGktLLvcFJos36jVd6m?= =?us-ascii?Q?zFCWmevVA71s1JqIdsqWdtH4jhZ+mxJGmG9gW6F3NqLLjmuf+TIupfTL9GZp?= =?us-ascii?Q?uK3C6o3WqSVpiQWVYz8PqYu1wQTx8SDSjTp5kwFR5mLUZpequK7taX57atM5?= =?us-ascii?Q?QWebv5Zb4dDh0UwgWi/L9eOt+cJDONn5XkBwQ0zWy9cqPygW3qMIcmSGpLJ0?= =?us-ascii?Q?0bFOQ2jC4+LuTAaeXXsUHukl6BE5IVpXx1+g1eetHt07SIj9Dov11Fpr0grv?= =?us-ascii?Q?48F/8t9bEJNyL7zkameTdDROYIlSXkEwu2qskEv0Ynja4cVTKPuDjzmQtQxS?= =?us-ascii?Q?C80GhmSTwH6hExBNTVT4qw5o/utmwaYTmzXMdEyA/5vBzVOwjZH4j3hkr+9s?= =?us-ascii?Q?HB21Jr/tqUtflPf2Pz/0eoxWnBD3xBMSxHNBHBUdECbCpvVtwk2VZGGDp4Rc?= =?us-ascii?Q?KJcvg5yKtnUszo/vgmPkmohyARbKSel6C0934/Ssp2kASXLC2/nvF9TBrrZj?= =?us-ascii?Q?II9Pc3RmaOxTTBN52n3Xz1fd8oWDq6qDeDLsFHKavbt7tnHLap1BlwCDzagO?= =?us-ascii?Q?iKClWX5+edGSMR+tihNUJvp9U/5bLxO2IaOHZODAXqRsiWhHQrRHRx693ABY?= =?us-ascii?Q?JqnJN0TYmwcBJZEp7FRqzzF68FO?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0505; 6:hlPw2gSRXmFdY1XHfD6tpEafGv4OppG6ytNBwH86rjzMrV5+8Hp3ZxCanr0/7SwxBzVMeaa/g0YMguFc0JPC/l4uG0aNajZtJPMqRMV5R0oZQ2rk7RHlnZbCe7ExPuExKkwCkGrl6exSzhJagdIstae9E9YOrl6icGOt00Mz7u5iSNUZJPdFdAc0eohWaUT3IIU6QYbJMUJ9R7kWmOkWdLNW9Q+PLiDS7M3PqUpr7mdDDArwL0o2vXGVbWDkekSuqhgijYId63WQpGD8ZWLLHVwA5UZn3JjcLZxmnewHzE5qrPiluaJ3LwQWVsE/L1umzZygMSwu3D29MEFgYtZXrw700dGjkS8v6hlBKX6fRqdypEqa09Egqpck6QSlvPbrUEjQAQgZAvzq1fG7LD5gGDCsbWrTwjFw388CgcY7xvEH0/A8x4vaEj6lMGqxdUhVCueRtHdbfmSIDwJErSh8Hzr5sQLnWXeOLbxFku2gf6EwXDttmBtWLCl9/7uCO7ugVVbAz3wLGemdlR4Iny+uz5MMPXTSEIWDJ5BJ3PxtlA4=; 5:FpBaUb74U19oouzKayD3sdH7bIxzsV0A0rsfM/8vDTgoHljkpurUwE4ap9knfRFcFlbbkvUCpwBR1qGIZWDA9RACoGo9S/EhRNbiUDJik+TcAAHa97j6WLdaamke+gqIJg86pOogbH86i9w0YR2BsQ==; 24:c53EnsE2QPq46ZFvVzrKgVZu8xo0ytwQo2BBG1NfucNQ2DDa8uRKSFxaTCrzpomfkzmPcOUkmjTDbT4649bEalxFJPvbFXbiqCW5PcwnD6Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0505; 7:fXvCdBDS+dSDYsUcI8j0ag5to3CflAUWrcYH5ICudRcbY/ZGF1il0O7yGvTJUCTusRl6zBtazlRUC0UyRpD9fOCC6OxLhgf1EQ++YyNGg1BlsbAUjMpnu/k6oc7uilylrQKOa1dKz02y3kJXEhUtJIQGqX4RSdTYoErdEuvoOG4T3CY8rOu5pANi74kh/kqeCWon0syk7DjjFKPliojCSyKOnrpI4bWLCyeBhG57bZju0ReULDa8M8+nhDvxJLjo562nGbwMx4GLiZgX5NqAxi989HA9FZ/iipTZXuHn70jh7fW9ptfKm/ZXwcZT8wpYcMdWsdmMW+zXo2gVYrzxIQ==; 20:MfBfDPSM6Fb2yPfv3hjztfnlAW+9CQ5yOGHRqKtIh2gHx8CG4QoYish9Jqz/DDNtknhoC6sqXo317QbHD4CNlvM2k90pvg+oFL0zLnHTrMAN8Y0wO6czbBCgCGKVrmy+i3zwroyDbAAbmOT3C4j5tXwZH2yDFn6NxLFK2HTu9ZQ= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:27.9397 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR04MB0505 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch does not change any functionality but avoids duplication of the code for clearing driver-private command data. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 12fd2bb0fe9c..f131964ecb51 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1339,7 +1339,6 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) goto out; } - memset(scsi_cmd_priv(cmd), 0, dev->host->hostt->cmd_size); scsi_add_cmd_to_list(cmd); req->special = cmd; } @@ -1677,6 +1676,8 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd) } + memset(scsi_cmd_priv(cmd), 0, host->hostt->cmd_size); + trace_scsi_dispatch_cmd_start(cmd); rtn = host->hostt->queuecommand(host, cmd); if (rtn) { @@ -1863,8 +1864,6 @@ static int scsi_mq_prep_fn(struct request *req) struct Scsi_Host *shost = sdev->host; struct scatterlist *sg; - memset(scsi_cmd_priv(cmd), 0, shost->hostt->cmd_size); - req->special = cmd; cmd->request = req;