From patchwork Tue May 23 23:48:39 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: 9744435 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 3DE956037F for ; Tue, 23 May 2017 23:49:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 305B128818 for ; Tue, 23 May 2017 23:49:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 253B22885B; Tue, 23 May 2017 23:49:26 +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 8806F28818 for ; Tue, 23 May 2017 23:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967833AbdEWXtZ (ORCPT ); Tue, 23 May 2017 19:49:25 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:51961 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765536AbdEWXtH (ORCPT ); Tue, 23 May 2017 19:49:07 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="116862548" Received: from mail-cys01nam02lp0055.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.55]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 08:07:37 +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=PUOExkljRlbPFdMPSwgenSNx7vFcION81SXV+BoR0+E=; b=SdH/ACgB5LoTM+oypNU0f/V4i8rSPSNLbt7tyUJ3W1+x4RAFcpyQ53Kh8IadvKP1TdHoB9ly9TiBAVX1YNWJTvab5M0pEGfQXUkLkCOIE5Rw/69I0xOMKL31lnI7PHX/fgTL97QIv0IrOEcK6yeXAvC6ps0NqEWpTTEydSfFX4k= Received: from CY4PR04CA0036.namprd04.prod.outlook.com (10.172.133.22) by DM5PR04MB0363.namprd04.prod.outlook.com (10.173.169.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Tue, 23 May 2017 23:49:05 +0000 Received: from BN3NAM04FT029.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::203) by CY4PR04CA0036.outlook.office365.com (2603:10b6:903:c6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Tue, 23 May 2017 23:49:05 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; 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 BN3NAM04FT029.mail.protection.outlook.com (10.152.92.148) 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; Tue, 23 May 2017 23:49:04 +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 5E.64.19026.F6AC4295; Tue, 23 May 2017 16:49:03 -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.319.2; Tue, 23 May 2017 16:48:58 -0700 X-AuditID: 0ac94371-41ba798000004a52-0b-5924ca6f84d3 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id FE.F2.18148.A6AC4295; Tue, 23 May 2017 16:48:58 -0700 (PDT) From: Bart Van Assche To: Nicholas Bellinger CC: , Bart Van Assche , Christoph Hellwig , Hannes Reinecke , David Disseldorp Subject: [PATCH 18/33] target/tcm_loop: Merge struct tcm_loop_cmd and struct tcm_loop_tmr Date: Tue, 23 May 2017 16:48:39 -0700 Message-ID: <20170523234854.21452-19-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170523234854.21452-1-bart.vanassche@sandisk.com> References: <20170523234854.21452-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLLMWRmVeSWpSXmKPExsXCddJ5kW7+KZVIg2+nhS2+/p/OYrHgzV42 i5WrjzJZtK0+w2jRuvQtkwOrx/3tR5g8dt9sYPNYv+Uqi8fm09UenzfJBbBGcdmkpOZklqUW 6dslcGVM/v+UuWC3bMXRtVuZGhjvSnQxcnBICJhITHrD0sXIxSEksJRJYumk74wQzg5GiXe9 G9i7GDnBin4/v8sOkdjIKHHy5TQWkASbgJHEt/czwWwRAR2JWXdfgBUxC2xnlHj7uYsFZIWw QKTErYvuIDUsAqoSn5qnsoOEeQUcJH5f8IaYLy9xdstOZhCbEyi8cs82ZpASIQF7icvflUEm SghMY5VYfOkYE0gNr4CgxMmZT8DWMgtISBx88QKsV0hAXeLkkvlMExiFZiEpm4WkbAEj0ypG sdzMnOLc9NQCQxO94sS8lMzibL3k/NxNjJBAL9zB+Pq29yFGAQ5GJR7eBAeVSCHWxLLiytxD jBIczEoivMs3AIV4UxIrq1KL8uOLSnNSiw8xSnOwKInzZslOjRASSE8sSc1OTS1ILYLJMnFw SjUwnnvc+0jg5yyZjOVPz0Ww6MXGdB08pX/CcHJw/dXsOIaFb0rjbOvNovY5ZR9U0OHemrZq QdtGwejL7ktel6+ZUFl9K/qc5N/85y7lventXNlShzN0k7y8MprXHeVaf4wjf8JD0+uNxztf /Fkgv62sqCHP6kD08ykXq51WeWmlJ0m+/M695vR+JZbijERDLeai4kQAvbiHeHACAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLJMWRmVeSWpSXmKPExsXCtZGTTTfrlEqkwb0tuhYHf7YxWnz9P53F YsGbvWwWK1cfZbJoW32G0aJ16VsmBzaP+9uPMHnsvtnA5jFtzXkmj/VbrrJ4bD5d7fF5k1wA WxSXTUpqTmZZapG+XQJXxuT/T5kLdstWHF27lamB8a5EFyMnh4SAicTv53fZQWwhgfWMEj3v i0FsNgEjiW/vZ7KA2CICOhKz7r4AquHiYBbYySix/u8Z1i5GDg5hgUiJWxfdQWpYBFQlPjVP BZvDK+AgcXT9fFaI+fISZ7fsZAaxOYHiK/dsYwZpFRKwl7j8XXkCI/cCRoZVjGK5mTnFuemZ BYZGesWJeSmZxdl6yfm5mxghARK1g/H6RPNDjEwcnFINjE1GW76tdjlt2uJxduVvRV7XGfWJ nE55wm9/9m7emPd/nWp7RefXBzOn/t7R0XX0q4P/01Oi37ZP3znxqO2p/HdvWdbcLM2Tt01c dKjvFWNGzozDB3e3Wn+8GemSdvJy8voA6WvcMTNnVp+9cE9W/tCzT9wS7WtfhuwOYAiq+BnL ueaCxSpP8T9KLMUZiYZazEXFiQC2qohOwAEAAA== 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)(39860400002)(39400400002)(39450400003)(39850400002)(2980300002)(438002)(199003)(189002)(9170700003)(1076002)(106466001)(110136004)(33646002)(86362001)(38730400002)(76176999)(50986999)(47776003)(81166006)(2950100002)(50466002)(8676002)(4326008)(5660300001)(5003940100001)(356003)(6916009)(6666003)(77096006)(48376002)(50226002)(8936002)(305945005)(53936002)(72206003)(478600001)(189998001)(2906002)(36756003)(54906002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0363; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT029; 1:pht21QDv4ZH9bXa21bTY/1mZMfOUHhlRWasnOf0koMqatfQKqCH+SHbUyw9ZeO5WlWJB+Pj6J2nFFH4qYHNCM/vO0KQv5TElZpE8GhcpoxR7OIG9pm5NTPXgyRWVP327qfWU7A8qmSaS+NuzJxvonXJQppJ59NmGhoVm9WKKHuAcRycMrUJ7naWpICyrq1U5Mk0q1gmQgGax0R5ZH8B5yFK/GT0SxnsEZ63aGbOrVoXXuZrV/r2NZ6hOskphqJRSNtzEh4MAKJzAVmhiO+97zYoJ1rDqmh91NsCwGTvaSSHjkmSlxHrD+NB73OrzHVcQTyKhpCSIqzuVfHS/t3GDh0tXrtEW4uigvFq+kItF7q70wXT8mqyDvns6fAVYKQFEVab2xYdqQuY03kf6pHrj5yAAwkf+X9HTSkVoSiZ24wIERRSvCOhoBPh8aJ36SBChFgJ7caGFJZK2tfGrX30fLjOMvncOOjQxlFX00NN+bzWpknxhiUJ9lXKipVTXmemjwoDzG93ZVHxnFvq2m9xiIEkl+mafP9Cz/tgFblJK5Vo= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0363: X-MS-Office365-Filtering-Correlation-Id: 0a633e25-96b8-408c-b9f8-08d4a2364bba X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0363; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 3:kN2XJXNQJSGus5BuKAwlvqHaKKRMQB0C8oYl66dqpAg3A+dASVIjtJK7lc4PpO5dqFozo0/iUiBLaLA05QznpXow7LmnIitW8UAcMqDrXUhHm8DfYXpX/sZc4PPU8SDicQMLjYNagHH8cBYNzVUDmdCQk051AiOiplwqs8EJP4aeiWS/FjeaOQxb8Il60YKjFcg0oou1iG5m8474eYSmY8IPanmH+bhcmtjGBZhsmPSP+qN6/gR0a9YOJU1GJFkIE4hGJENEEgyXAg10VLIxl8ajx3/KD9P6J2JRBquGwblGkiMQH7xdIwQZysdYUDYqxuTAKIi3hGTD5LcOlII5Krm+qzik/ri6CVy2ECyw0qkfC882mkqkfzF50oGZbj4xO+GS08P1ADZHwor1bUhMJDs3LA+zCdOvg/Cs4TmwB3u6mFUrMn/UkDs8r7AcOy3jdjW1jhuHmaB9XlGfMxkUui6I8rci3hwOY06UwxQigW4t06D0C+Klhx8m4Wd4TDpC X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 25:mdzGawFdLIhXwsG/ILEMmseR3SCLOCygn8yZDlNppluTNSLx6AicsIMbY7Erl+zuzfbxzQtVI8juj5pOhCUQjTq6FN/YSEBlLt/My0PEYmSl5A172Zm9OmecUJJXdY+jaO2wwxqiljxHeelsDoIS/m+/jzRb4xKQVqoIg88V5RKPqBEYUvIW7gyu9XCGPeAv1gfNOf6c1LgMh1l7oDGypL21AOewreDapgK7ziTO7OBIgJz5hQDlx+Im+hFPeFSsBtG3o1QfWCRgIKadd3PSjQH/z8AVm1OTAlkDsU4kifdH2aVjkj/5H5EtzDX8DuPXN4PRdvcmwwaF5DQqRpd41BbyiMHPy0mkc2dCHs+SFpgbEsbVMplmxIFXrzXmDMv7TuWZlZ2bZ3YY4Ofrr/1blbOrkKvOvbkf2OyC/H/BuqFqvnwQqXmQ7mB708EXKGGZfaTPJxtMfTrc5nPaeDj6z6mxNb8NEkqbH0yA58tFFxs=; 31:z8ZAap5iVCOHlEnHtaYDeiwoTdasI73HMGc7FO6PevTKmGiDe1lNOsiMz3KgoIUzpvy7RfXXM0T6YliFDVCghqHGTR4ICBNW9XwMCnaOAlRX8fskNzirapfrZOrtns7eyXG8fCI4aEYaUtiTgcg8pKuDjPpm01DfKISYPvIKeWcSEmiNO0O3KzDPTbGRWb50JS0L/ZUmiFnmvA9YLHybj0u3ibZwzytoqBYrcvf4tD16Ti+3ySD+pFvmEJs3XE4UycV/xdpG6hH2DyygCDZ+7g== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 20:3Ho2XThLuzSVlBVqnSROi3putdWz8afUkmOZhHaqHiJubkRAcHKulBi6l1DsZSTtfp0aaMAgSsH6pBrprTQPPdSwr80asTaHjgbzeFA0uOfx1FkI/byYZMw5fvNAsHoqc+l7blzhKMKY8hpswnqPdCbjsiazVbcsEd3HKmWJgCEuMushjm0JnQiTSykWX2Ez2GvyA1ArAiZMQwvMN9hx0H+KNE9XKCkRQj4uNyZlnQCm/t6G5OIuA8AUrBvCLdEUgWZ9VpYGfZGGfXElGwg2FhSI9uvv1+WtSD6uTOcaL/egZqg1/C8dGlt4vKCJC8mKS88Oz6gKRePt4IleDvgFZjjuFpzJ3vR8IsbMN/W2giX3liFD1P2rbbXUcflCzNSsjXdnNBB25PBmsYaz+kI+b04Uu8riLHRjYJvxT48LH5f5Ep52nICGt6KxpuP9Q5vxjTUsbnwVjYABGb+7JNUYwyKU15Xyq9zsVw9ve6fL0kMXuNbEyo+kB3l+VbgWrfCa 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)(8121501046)(5005006)(13018025)(13016025)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123558100)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:DM5PR04MB0363; BCL:0; PCL:0; RULEID:; SRVR:DM5PR04MB0363; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 4:Jmse+YKAC00MUbwjuNRgkTapy5YGBBFOgGWglV7tNdvZ6nAp1XNFkGQS8IU7sBMZeGVqK9KU0vx8om6qT1/zWHejtDGZp0D0tbSbHtgen5zXaGhcwGobQeedZsNXseDyLGLqOjHXMidbx56bfyOrQXxOwrbBulSHIVdFQ3JeZWPXGUX8GOj5UR7BxWYPJX8m5sOu31NfA3ucRQDO/OkzhERCBkA0ahFG/qAzYCOSA5v+g9uR+zJa7EisJGIrP4uuGPpdvGdXLoPvcE0XKIF/cvqgsf4eSKqincEpQ49WZudP5ROc2HP2fPGAjlIqBddub16mgv7bdfivbuGlI0y39KNf26UGF2uosl/acJrQlQfck5IwpwsT67NwFpEMvp0LNPQR4mE3ueZ9IER/F68gYBb0/8eHcS7gOJrRMKhIquvXCqfObro42WInhOmOhsPMspCPAglR0Lu0nr8OGw7ZGhs/kgPkJyrrTf7uFA1ASoibu4q56Oz2IZDO/aAG8hQMZKqOA4OhL7izhE8qESqtik2n7MtkxLFYfhXpmdbodt5DNjQBytMPAVyA/GfzvQkbYEpuvjnB+ZEfIetMZEAbLjPi1Z69Wjt6OF44Jh3ouDkvJgHDRNkwLBFm9UN3QtbbduW8yWE2/nQa1DlUuhkT5P3E5XjnXPRKUWmWHWvLiHREfO4HVd6kA3A+SvTY9udlVPrVmkynBU/b+ISAXdvqC6glZfXOanaUtd33xXve8dfvUP1AV6aWeQHqtryWuqWJ3aSmOrdF14MaA/NC+NYTlAkNi4qgVKMYGc2hsFTKfjTlR7GANcBIc4RbwHPMWaZ+5EA9a1e1OoZhpos0vbSGNxDRMgpL4AloOKpL81RZEiCYFhFy4WzY0gSdADu2ip2V X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0363; 23:ZltHK2e3B4TveuN73TaOVUN3fYRTeQfJozxMpV4zJ?= =?us-ascii?Q?ifq2Ft6400gC+79OfbFqkRRp4iqJgItDDOrdmutghSPVcNm6TVNozqr97sfa?= =?us-ascii?Q?xUsnoq/oJm0/wN+fIMOHBcHrv4NVC0yMrd5KnaC8fmmIWfj/rIRYreTDq7x9?= =?us-ascii?Q?S0xpdupvrD7155/9tuhvzzCNDGIQ4LdtwLMWecvO5V7obdgVEPqObW0142NT?= =?us-ascii?Q?PiTj5E8cjLv6yn3EC6nXj3J1aQW80hM7k3/MxU25eENtNYtVXr+EcLZXFlQU?= =?us-ascii?Q?xlfjcGrhGW3+YB6irI/jjdYrTiw4qi7DKiL/KOwmn7BX3q5rfbc6fhqQ0O7J?= =?us-ascii?Q?pWjUjOeYty4nRMaL+xK0A8h1pjORsZQh6td2MHyb40u00+iWAI32thG8S5sO?= =?us-ascii?Q?s3dVniJH7eZhHMCyrjzRaQv3G30VnZqnUp8VXU4X7rmRugGBa4i8TL9XbuN+?= =?us-ascii?Q?zKbnnGjG7MrR9z3XOA1fus6u6HUSmlUlvklDzGYwL3pHFyyeyrrrs78wRT3v?= =?us-ascii?Q?wsRY6L3O+fckrwUQSbbGZveftI3j4C3dLEAf4AbT1AvG9eDSVJy30Y1zvd56?= =?us-ascii?Q?8stmQiiOWeDy8Xk7gbIcqDDIn2tSdsDbhvl0DesFz+X2t4oU++aFTjqi5aM7?= =?us-ascii?Q?6AckRj5mpqkiWVGBEqy8StIxyT0Orju1Gg9R1gAf7odqTBmw1lNcqrI/craW?= =?us-ascii?Q?kLqVObi6waiNzfMNrnMxHc/juy9dc1/BYmYFENP/ELjK2Ze5tjIIP1RZkgLS?= =?us-ascii?Q?pQZKS/GVV7jvxPumsagUFB5P7d0Um/R/D0CNOocx/2vEV0O9TpWlSjjtKHxB?= =?us-ascii?Q?JubAFg3JJI+LnsyN5X2xVP7FdoXOkSZJu0BUUcdu87Pd6+cdeIIgqRSrkDUu?= =?us-ascii?Q?dyStrTN8joZc1oFF1WvWVTbtm/rz2M1Ej9uLMF+E1g3zZLuwH3AFbPNygdxV?= =?us-ascii?Q?SV6TQkS4lI0y0HqyZPwrtdTDCQUkT1ggphabfMLaoDkDtjdVVn/SGNBPIigd?= =?us-ascii?Q?efpd7ZOMMgNgNl7/ZoEuo9yMZLvIiwYUpHl+umZduCn8jUwphHwjdLH6lfe1?= =?us-ascii?Q?KTyIHH9zYLJO5JTcTGek/KYBzYBrrAdGfCnJxaU+B0BBnR1Ew=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 6:Rel2l/KvuuUk1dTXyuhxI8WzJT2z039qP/1RfBLHY+DL7l4u99TULmAlURDXyyrWoEggRkNnscaXQh1BTlspG0laMjT71PiXTqUna/CYz4PDQtEX5/gkZW+QmHvPweHtvrqz/kxOwBu2uT8zouUl3kKriXON446T8EguxT+gWIMVJi6t1ApAvIz+m8zQT+kpH10C+0XGI3fUmtkZ5jWrYX3avn+qIMfa9KKKwDb8qQaWGNHwUSwrLAkZpBAr7uiI/98mEybVj8MJYLOiDFcuv1lsJwS0YB4dIFfor5VHw4x7dUYaAc3j33E7/CsEveJ8iGzjBZLKHwId8WggjferJ0PLSm+Ltr2mPttGYs1bfmUUJNNYbp1BZnwSU3wE2/3Nz6NZtNSdR9XpEM8P39Z2NhFPhAXagHAQVxdm671dKwMDjUZPwmVFLuxfe9le12HoELjKTTNPY/7U181urdRL4d6tuMYFPl0wDCOmdXH2T0ft/2kuYJHpK2hOCqDSWhkPAs3C9Bxy+7mcI6vX1C68tgrTgncTuUw7v4HpHOE/soc=; 5:vfk49U5pAg+rosJINJUHSr37tyAlqUNOcEdb9t60+Ybi9Qs2Gpn2Mv0HlcUvZUIqFgqbfPFPoYyQjBbpIJVQexBDSfg422HngJRcfqou5UFxM3WcoSP9opFJPZ3c29dro0JqX9uaj94s0mCP7V+DYw==; 24:f6RCKDFZA7JxlWB5vWOlfbMzu1WE14DZk6BWRPG9laiJX/jocs63sIuVMMoum0eVeIjFXHWJ3O2S78bYUnSvmmfyPdo2i4BK1MK0h6qAHXc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0363; 7:ONgfEbYC/8/sDctneqfTQBfg4OFSpVrb7HA3ToTyNQ2ErMBQXdRgNYfGziiHbBgHTHVYYwGDtPmo9KoEF5z2kd1VstF0sAXXcVKx1npDMLIyh3niVXmZjA+ND/SUuq4xd51U7L22IxoXE0fnUlcCHboRHZv7/H9eJHkYDbIxMVG0Z/J66TIgEzs90TT8e1I8uQcKRrobKt0J6soc1r1/wz7D0GaY0b9R+Iom3hUaHFeTpMbbP9BdCobCm5KmR1DSRCPNwVfvFWfG9wnhhRE+ZEZs2NOf4wGMXdROn2zyJ9uhlV6LBzq6U4o0jJDj23llmxrfrheM38So8L5MEsFF2Q==; 20:bJFHlZbQnC5qBbzGDp1AK43j4LUiEmUMJ5B8o5DdoIKWAWQPm9OvQ9ftH60XCH3dfnYZuTSKpDQ7Pgr4xFqP+N3CJV3NRVdye1+43s+mbDKlaPcIybD0UGrJNXMou2WXF1iUpv/itMM87tEXNU9pRO29yOzflFLGWDaDJhdnSuQ= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 23:49:04.3692 (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: DM5PR04MB0363 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch simplifies the tcm_loop implementation but does not change any functionality. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp --- drivers/target/loopback/tcm_loop.c | 22 ++++++++-------------- drivers/target/loopback/tcm_loop.h | 7 ++----- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 5091b31b3e56..79776b447b15 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -221,7 +221,6 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg, struct se_portal_group *se_tpg; struct tcm_loop_nexus *tl_nexus; struct tcm_loop_cmd *tl_cmd = NULL; - struct tcm_loop_tmr *tl_tmr = NULL; int ret = TMR_FUNCTION_FAILED, rc; /* @@ -240,12 +239,7 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg, return ret; } - tl_tmr = kzalloc(sizeof(struct tcm_loop_tmr), GFP_KERNEL); - if (!tl_tmr) { - pr_err("Unable to allocate memory for tl_tmr\n"); - goto release; - } - init_waitqueue_head(&tl_tmr->tl_tmr_wait); + init_waitqueue_head(&tl_cmd->tl_tmr_wait); se_cmd = &tl_cmd->tl_se_cmd; se_tpg = &tl_tpg->tl_se_tpg; @@ -257,7 +251,7 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg, DMA_NONE, TCM_SIMPLE_TAG, &tl_cmd->tl_sense_buf[0]); - rc = core_tmr_alloc_req(se_cmd, tl_tmr, tmr, GFP_KERNEL); + rc = core_tmr_alloc_req(se_cmd, NULL, tmr, GFP_KERNEL); if (rc < 0) goto release; @@ -276,7 +270,7 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg, * tcm_loop_queue_tm_rsp() to wake us up. */ transport_generic_handle_tmr(se_cmd); - wait_event(tl_tmr->tl_tmr_wait, atomic_read(&tl_tmr->tmr_complete)); + wait_event(tl_cmd->tl_tmr_wait, atomic_read(&tl_cmd->tmr_complete)); /* * The TMR LUN_RESET has completed, check the response status and * then release allocations. @@ -287,7 +281,6 @@ static int tcm_loop_issue_tmr(struct tcm_loop_tpg *tl_tpg, transport_generic_free_cmd(se_cmd, 1); else kmem_cache_free(tcm_loop_cmd_cache, tl_cmd); - kfree(tl_tmr); return ret; } @@ -669,14 +662,15 @@ static int tcm_loop_queue_status(struct se_cmd *se_cmd) static void tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd) { - struct se_tmr_req *se_tmr = se_cmd->se_tmr_req; - struct tcm_loop_tmr *tl_tmr = se_tmr->fabric_tmr_ptr; + struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, + struct tcm_loop_cmd, tl_se_cmd); + /* * The SCSI EH thread will be sleeping on se_tmr->tl_tmr_wait, go ahead * and wake up the wait_queue_head_t in tcm_loop_device_reset() */ - atomic_set(&tl_tmr->tmr_complete, 1); - wake_up(&tl_tmr->tl_tmr_wait); + atomic_set(&tl_cmd->tmr_complete, 1); + wake_up(&tl_cmd->tl_tmr_wait); } static void tcm_loop_aborted_task(struct se_cmd *se_cmd) diff --git a/drivers/target/loopback/tcm_loop.h b/drivers/target/loopback/tcm_loop.h index a8a230b4e6b5..21340781568b 100644 --- a/drivers/target/loopback/tcm_loop.h +++ b/drivers/target/loopback/tcm_loop.h @@ -16,13 +16,10 @@ struct tcm_loop_cmd { /* The TCM I/O descriptor that is accessed via container_of() */ struct se_cmd tl_se_cmd; struct work_struct work; - /* Sense buffer that will be mapped into outgoing status */ - unsigned char tl_sense_buf[TRANSPORT_SENSE_BUFFER]; -}; - -struct tcm_loop_tmr { atomic_t tmr_complete; wait_queue_head_t tl_tmr_wait; + /* Sense buffer that will be mapped into outgoing status */ + unsigned char tl_sense_buf[TRANSPORT_SENSE_BUFFER]; }; struct tcm_loop_nexus {