From patchwork Wed May 24 00:34:11 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: 9744773 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 4EBC3602A7 for ; Wed, 24 May 2017 00:36:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42A2F2885B for ; Wed, 24 May 2017 00:36:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 378AF2886B; Wed, 24 May 2017 00:36:10 +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 96BBD2885B for ; Wed, 24 May 2017 00:36:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763394AbdEXAgH (ORCPT ); Tue, 23 May 2017 20:36:07 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:5764 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759591AbdEXAe4 (ORCPT ); Tue, 23 May 2017 20:34:56 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="19885597" Received: from mail-dm3nam03lp0018.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.18]) 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=TcPTMJaW+919BW9qxz266oi/scVbBmwrjheKv13431k=; b=bsjCYGm8KlMKkQry4Zx/aXWVYLLymHByF0qXzPzAcyV9lJBarX0JdMCWIhngitFKex4BHkItMjjsncdq6KWEkObomGrgR/n7T5xIqi3OM3mRqIZONHamVFXjDBicFnB04VSghNeCWenLCFqaGCgt7JOrrtC+qaRou16vUF5oJLc= Received: from MWHPR04CA0034.namprd04.prod.outlook.com (10.172.163.20) by DM5PR04MB0364.namprd04.prod.outlook.com (10.173.169.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 24 May 2017 00:34:29 +0000 Received: from CO1NAM04FT053.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::203) by MWHPR04CA0034.outlook.office365.com (2603:10b6:300:ee::20) 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.21) 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.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 CO1NAM04FT053.mail.protection.outlook.com (10.152.91.79) 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:28 +0000 Received: from MILHUBIP04.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 3E.43.45291.315D4295; Tue, 23 May 2017 17:34:27 -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.319.2; Tue, 23 May 2017 17:34:23 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-08-5924d513cd94 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id C8.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" , Hannes Reinecke Subject: [PATCH 22/31] scsi: Inline scsi_init_command() Date: Tue, 23 May 2017 17:34:11 -0700 Message-ID: <20170524003420.5381-23-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+NgFrrJLMWRmVeSWpSXmKPExsXCddJ5ka7wVZVIgyfPtC0WvNnLZrGxn8Ni 7y1ti+7rO9gslh//x+TA6jFt0ik2j49Pb7F4rN9ylcXj8ya5AJYoLpuU1JzMstQifbsEroy+ hk72gmvCFZsXzmBtYLwh0MXIySEhYCLx6vYX9i5GLg4hgaVMEqd3PGKBcHYwSrzvnMEOU/V7 +gWoxEZGiT89LYwgCTYBI4lv72eygNgiAoUSl7Z1MIIUMQtMYJTYd+sjG0hCWMBc4vLDQ0xd jBwcLAKqEo9nKIGEeQXsJb5NbWeEWCAvcXbLTmYQmxMo3vVqAjtIuZCAncSi7RUgIyUE+lgl Hp9ZzQbRKyhxcuYTsL3MAhISB1+8AOsVElCXOLlkPtMERqFZSMpmISlbwMi0ilEsNzOnODc9 tcDQVK84MS8lszhbLzk/dxMjJMAzdzDefeJ9iFGAg1GJhzfBQSVSiDWxrLgy9xCjBAezkgjv 8g1AId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rznZKZGCAmkJ5akZqemFqQWwWSZODilGhiL6puF 5fO1LTJ3/98wrcetxjbmpleY769Tai9lwu8Uxkq4zXm0xcDlQev5b39/Bn0LVZ/EUP20mfNA 4KpTPe1761asXfDQ8dIBx+vfi26d/186eVr9IZ6sNwtzxX4nVeadlClnndz5tsa0rUE85cDu bSKFS6fd0pv28S2b9n69rfJLVzw/plegxFKckWioxVxUnAgAvFJ9NWwCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBJMWRmVeSWpSXmKPExsXCtZGTTZf/qkqkwcP90hYHf7YxWix4s5fN YmM/h8XeW9oW3dd3sFksP/6PyYHNY9qkU2weH5/eYvGYtuY8k8f6LVdZPD5vkgtgjeKySUnN ySxLLdK3S+DK6GvoZC+4JlyxeeEM1gbGGwJdjJwcEgImEr+nX2DpYuTiEBJYzyhx/PNOdpAE m4CRxLf3M1lAbBGBQon7p0+zgRQxC0xglDh29xMrSEJYwFzi8sNDTF2MHBwsAqoSj2cogYR5 Bewlun9eYIFYIC9xdstOZhCbEyje9WoCO0i5kICdxKLtFRMYuRcwMqxiFMvNzCnOTc8sMDTS K07MS8ksztZLzs/dxAgJi6gdjNcnmh9iZOLglGpgLOR2iohfs8/ux/bFm9ZNEZCOqld6GqJ6 Wat99VH+RYcmXpv6VK648N3tzJnvjx9++Xjy36f3snz4LzAucl852cnqwb4Fphu1grakJVru CJKtUGPR57FhYXjx+eynoDazz3mhwfMWCVgxt/X29qtuY1rGcfzTzO0MtsZzN+aolU2acMX+ TfFBASWW4oxEQy3mouJEADgkixy7AQAA MIME-Version: 1.0 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:(10019020)(6009001)(39860400002)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(2980300002)(438002)(189002)(199003)(9170700003)(189998001)(106466001)(50226002)(48376002)(6666003)(38730400002)(356003)(50466002)(36756003)(2950100002)(33646002)(77096006)(81166006)(8676002)(2906002)(86362001)(72206003)(5003940100001)(76176999)(50986999)(8936002)(305945005)(1076002)(4326008)(47776003)(5660300001)(53936002)(478600001)(54906002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0364; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT053; 1:1YGWj6SXM51eTi0EoEdtXpIv64Ke02348AIQjvGUYTGXtZD//Eki0wursLYKW2bG0H6XjXIyLoj1gqbtm81gBtDKwYpPpNUIFVCNOvfE4oUS3s/ozlOsRpCcODyI0a/fxLYB0AHBlvGcUVBbCJrS6Y7i4HXkdAtjedsfVIqZ7kYAlmhEuYGo+8gadoKFQnXmX8M7uKsUcy7v0/jYCClQKc+j+5zVeGi1VUYOzvSMuFv9ua35Kg3Au1yfbv1SDqBu9HGQt/NyCxwolEEy5wczjsyL+XdNb7XmxdERps3hed32yohJS/HtSuBPQsXnJ8NjnWvsxBTVLsKG7yG0/1nQCCGPJqqT3KQ9iaQdmTDAK+PG5lEkybqGIKs/KXyJ26EGNob/yDXTjyc3LEJFAjJ5kZNQa2nJM4zemO4ihSojeWk6+VDGrgxs59Re29biVFTOPAy5JuH96GzNSUdoTSrGaOBCkv16oFNaW1CgLKGRe583zAPZcNOciv7mG8Aq0b0PbzJavw7pAMDuBTj1VozPKrdqwRJ+2sfbKXtF5JPy/Dk= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0364: X-MS-Office365-Filtering-Correlation-Id: c9cff62f-73db-4816-74a3-08d4a23ca341 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0364; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0364; 3:4deHFnyv7oG62hrAvoyfx/b8YiFH+NoevaHvEcCnlYy+MDHsZ6dL98O57bX8jDSNE9kmBhVxuVwjxy9fIC8l8sEdQYramRs9DHnRchRG3aJjQP27rcv+loJwYgfl5iPmD35JJ/shjr1FOQJyJ/oJ/heRWsYQsSwCDwS+KLx50LeRj7Luki057uifgI3uEISdeY/tlMIAsZH9XlWYVo762QpNpqCoiL7JLPpKmpY9uVS35Q6Xzd77YQN92Iuo8DFm3+40pYPyjFuDe43VyHQxv7HMksanTtSemJg3rntsHewNbN+h+oWioKXIqn6K8yhg8CbXukx8t0srj+FcrnQLsDIV5cM7F8qHGJyQUVOO9/caT1xXqdaVSXZGhECqoClbp4Cj6/F9OAIUM72s37znhJijLgFyNb80xSQAAnekW1oTRrEUcNk6CLTX95x0iM4Fdls+8IZT6UplqzLuzN4aNnc1zHM3I7ar+KBNqB9zv5Q0dfqh2cMz3OJyNJ+x0iX/ X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0364; 25:QVZfp5XfYGRHq/Wl3Ywv5G+NCgLjlc8XPUCfmMtdswa/LrtdJ3cS5EMlpFbFV5NgDh+s98k/CxgZVwtV97hSlOQvfEn/1zL5Mxfjz0QtjGpCiKBqBv2JxrB4PPF96Vsjoyg2SRjGVjWnXElGn1za6HYfevpt4cxLtcoaFbPaBfZdMLJrK6MFqaydlKhL3IR66awdPZCs60zsLLOGE/V67FB8liiQg0lhsuyawdvYL9XwpmBFNb+9vQLt++iqIugl0p5vKnZ4hQWZLRols5h6I9g8IYijpVkBLcl+dHAK81XaVCxB1jzdMzjFV9uoyN/EXKNg6ketT/+BWT8n6Tw7DSqM+b046tnvfn1aJQrIwbw937iHuozDXgEpSWPTgwNqoGq+KQI1PJ9+HxYPpeGRl9Fmt9uyeiVg1H17H3LljrqTrpp+Z+wo3y6VUsSkTsPSwlNk7JbKrtMCHR0DQl/VVMDBHHVAbez4+xiSbV551Kw=; 31:zLfmSIzcsgdlkJh/140CAQPJB+eW+VX8L9wenTJ4PExhxyt+lyaV/1GjStEx40YGlXORhdvh5SVvBu1D+BHf3HZf7qCw9iJMLgv43l6j1ThZ2uIWeucAlHB5xiWbWfLjIZobxx6UuBaMzInC8T98yDzioaYcBqCTrKOtRXE6nrChlHwVBoHSqLKSRt+HAqn9wQcnZtAaUXSjf4rTmHSLE42QsBscYxRNR9YP130NS6/evWApRXCu4mkHezYNIqpY WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0364; 20:sn7vsSQ8DhfEEv7kUGY7VF4z0DGMHmPSn1hqeFGLnEVc5/j9/oGVbppNEB5aqcLvMwqbZt5U7vwRtIne8UVWtLdRzRkLDjmV67LLiDAsZTPIcu0uKRVDbn0xMVYL1xzToDGlN6lwJWELfGR0HjcwIpvuoa6Z30mcZvlObjSP1K3GKPJIzHVXWchF6DPpknc/NhVzRN091qTtIUadFk4Kdk2WNa4UGYUaZ+g7IQQ196WOYbC5108Qtmh6hu0/EXvmwPOe+cV85ffAvqJZbmZcpgvBwPre3ytL2XikfCXCAzSIz/+DEOWCHSKW/55OmUR9VZIhxxUeW+aKNEXXOaW4sV4fYbtiVW4GX3P0RLlsB2OI8G2/Xo+bqtVcGghYPjL2enx5HrcaLaWUs1V7fSAtO2aefBuKVl+rqFg/+/Jevoz4MpefmMdc6OiFRjFLzdN6JJ5s9vkpqgLeKw1qxoMyMuE5ruf+Ivn/KDTdTkCStFjoFd791WkHZPktJjEsnp+L X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700052)(100105000095)(100000701052)(100105300095)(100000702052)(100105100095)(6040450)(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(100000703052)(100105400095)(3002001)(10201501046)(93006095)(93004095)(6055026)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123558100)(20161123555025)(6072148)(100000704052)(100105200095)(100000705052)(100105500095); SRVR:DM5PR04MB0364; BCL:0; PCL:0; RULEID:(100000800052)(100110000095)(100000801052)(100110300095)(100000802052)(100110100095)(100000803052)(100110400095)(100000804052)(100110200095); SRVR:DM5PR04MB0364; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0364; 4:WML3j+2xx6dXVQJEQwnQ5msYTmLOdocAEck1Y75HRD?= =?us-ascii?Q?2zEnDzP3Hp/AcJ856G6qrsZbikh2a9V7KVR6GZ3KgBgzXf3W5TAEZCbAJ5qK?= =?us-ascii?Q?dDdOqByVeBUCj6kOTDrUPBftM7eSS+1OP4Am0s/t/USdgxU0LFw+92AnpCv2?= =?us-ascii?Q?q6lzD7hTwUWrcA/MgfC4mzpMIRT2uEJ5iWm9ksfgIsMftwX/eMTbjektwIXR?= =?us-ascii?Q?Yy7fYM33oh38B6Hv/8qW/spBfcC7IEzHimeGGNRPpRQrGN3Q3OO992XoN9Ea?= =?us-ascii?Q?Wz4K46dmC3zDAI5jZ6XywMGr5tuc9OY1pnUmzLOE2HyzD2Absl37d8aLutUC?= =?us-ascii?Q?CAbeOtE2MbDWsTFeitwJZ5quVHmArINO3DtocYqKLK6z3X4fB2n7v8atdvZ7?= =?us-ascii?Q?zFroRfwUfXElAr2/4+nYQQWjgY6eSX9IUHNnuuQaoLMp4n5nZ/DnZLQu4fyP?= =?us-ascii?Q?NBJMBqvq1vWjExxJB9WMH2hq7bv0ApPGMuuTWuwkj6kRtapKzJR3KfVwk8Vo?= =?us-ascii?Q?iYxR5X70Dv+MfRj+EmaEzeNBPMcKaE+Mewt36O+BJs0CKqmIdcEYTw4gzYgV?= =?us-ascii?Q?UsV42Vb9uQcwcbSd7zGYefN2fmISjzpyq7RdD9CRHfC/uIiKjIcidWqZLkCz?= =?us-ascii?Q?5Cu9hi3b++pLy/2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==; 24:/0l6/1tUkaPhOpneOdqBSB3ODcRme0JW9autJPtCRaoZ1BMm99Tk6uU3w652Be/N+S0rYQemNVcjfkRd6IcWnl9Ugw6pWrGJ8qNO1ISq33M=; 7:me7toJBnvOZqsCx6DPcDIe2gFD0gWxCS7Njwgdv0oqeGD5zblgvnw0a3LN3mAwCdGCB5bJQcBsZUBYz7gnoUuXtdeOlmcDr9RYITIwo6VI/WX3f1QlJwJtTYShflZ9290SNUxnpl2xMpuCIcpUgEWfXJPImOxmhil0Rf1hVeeLbY2bb4m6AD7uDt6lCzg5fNPWvGGscTO8PSG3cYoDdgNzx8Fpe0CcoP+uPD/ryqDkmZyGf8XG1ZWPv/hoPp9c1ceEGtScc4RCc06K9TyBb6W2qFd4SlzUBZELAwVmrKmMjxEQGtKsJWCA7EiOJW8gLv98o1ZSpkwqYQUg1fncDA3g== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0364; 20:F/PYnDv4nt8iUZscPzFvwwdPL+NPHk2ynqk/GyrtvRLHY766QDavslfYzUZfiL37GBLPXqyzcAZBw1lx8XYJD4YabnXVL6DYtUjwSMQ+TWVB9PCMzQ5n+m7eHAyFTmzb77mgwmEE0Mqm/XthqGfymuw1o6y+MKfzB4pkOans7wo= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:28.3670 (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.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR04MB0364 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 The two drivers that use the per-device command list, namely aacraid and dpt_i2o, expect that that list contains only SCSI commands and no task management functions. Hence only call scsi_add_cmd_to_list() from the block layer prep callback functions and not from scsi_ioctl_reset(). Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke --- drivers/scsi/scsi_error.c | 1 - drivers/scsi/scsi_lib.c | 10 ++-------- drivers/scsi/scsi_priv.h | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index e2e614e990a8..374dea0885f6 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2293,7 +2293,6 @@ scsi_ioctl_reset(struct scsi_device *dev, int __user *arg) blk_rq_init(dev->request_queue, rq); scmd = (struct scsi_cmnd *)(rq + 1); - scsi_init_command(dev, scmd); scmd->request = rq; scmd->cmnd = scsi_req(rq)->cmd; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index d2e6b4c14e35..359f824ab78c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1170,13 +1170,6 @@ static void scsi_initialize_rq(struct request *rq) cmd->jiffies_at_alloc = jiffies; } -/* Called after a request has been started. */ -void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd) -{ - memset(scsi_cmd_priv(cmd), 0, dev->host->hostt->cmd_size); - scsi_add_cmd_to_list(cmd); -} - static int scsi_setup_scsi_cmnd(struct scsi_device *sdev, struct request *req) { struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(req); @@ -1347,7 +1340,8 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) goto out; } - scsi_init_command(sdev, cmd); + memset(scsi_cmd_priv(cmd), 0, dev->host->hostt->cmd_size); + scsi_add_cmd_to_list(cmd); req->special = cmd; } diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index c11c1f9c912c..67d1550d8b64 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -30,7 +30,6 @@ extern void scsi_exit_hosts(void); /* scsi.c */ extern bool scsi_use_blk_mq; int scsi_init_sense_cache(struct Scsi_Host *shost); -void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd); #ifdef CONFIG_SCSI_LOGGING void scsi_log_send(struct scsi_cmnd *cmd); void scsi_log_completion(struct scsi_cmnd *cmd, int disposition);