From patchwork Thu Jun 4 22:57:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 6550491 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2608EC0020 for ; Thu, 4 Jun 2015 22:57:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 301302072E for ; Thu, 4 Jun 2015 22:57:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 238D02071B for ; Thu, 4 Jun 2015 22:57:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752983AbbFDW50 (ORCPT ); Thu, 4 Jun 2015 18:57:26 -0400 Received: from mail-bl2on0096.outbound.protection.outlook.com ([65.55.169.96]:45952 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752616AbbFDW5Z (ORCPT ); Thu, 4 Jun 2015 18:57:25 -0400 Received: from BLUPR02CA047.namprd02.prod.outlook.com (25.160.23.165) by BLUPR0201MB1539.namprd02.prod.outlook.com (25.163.119.26) with Microsoft SMTP Server (TLS) id 15.1.184.17; Thu, 4 Jun 2015 22:57:23 +0000 Received: from BY2FFO11FD033.protection.gbl (2a01:111:f400:7c0c::111) by BLUPR02CA047.outlook.office365.com (2a01:111:e400:8ad::37) with Microsoft SMTP Server (TLS) id 15.1.184.17 via Frontend Transport; Thu, 4 Jun 2015 22:57:23 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.172) smtp.mailfrom=sandisk.com; qlogic.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.172 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.172; helo=milsmgep11.sandisk.com; Received: from milsmgep11.sandisk.com (63.163.107.172) by BY2FFO11FD033.mail.protection.outlook.com (10.1.14.218) with Microsoft SMTP Server id 15.1.184.11 via Frontend Transport; Thu, 4 Jun 2015 22:57:21 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep11.sandisk.com (Symantec Messaging Gateway) with SMTP id 0A.AA.04667.1D7D0755; Thu, 4 Jun 2015 15:57:21 -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.224.2; Thu, 4 Jun 2015 15:57:21 -0700 X-AuditID: ac160a68-f790b6d00000123b-e8-5570d7d12d28 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by milsmgip12.sandisk.com (Symantec Messaging Gateway) with SMTP id 14.75.04661.0D7D0755; Thu, 4 Jun 2015 15:57:21 -0700 (PDT) Message-ID: <5570D7D0.80500@sandisk.com> Date: Thu, 4 Jun 2015 15:57:20 -0700 From: Bart Van Assche User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: James Bottomley CC: Himanshu Madhani , Quinn Tran , Saurav Kashyap , "linux-scsi@vger.kernel.org" Subject: [PATCH 09/10] qla2xxx: Comment out unreachable code References: <5570D656.9050704@sandisk.com> In-Reply-To: <5570D656.9050704@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRmVeSWpSXmKPExsWyRoxnke7F6wWhBgfua1m8+PGE1eL/+tss Ft3Xd7BZXLvxltli/sy/rA6sHod//GD2WPflBLvH501yAcxRXDYpqTmZZalF+nYJXBmrnv9m LNglWtGy8htLA+N+wS5GTg4JAROJGd+XsUHYYhIX7q0Hsrk4hAROMEqsvTeXESQhJLCdUeLf HWmYhrU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MDw5Q3B1ezDmr6dP10xM21610 XGLkfvjJrikKgls/3Oj3+r/+RumrJ2sDWE5xH98dxNxt6mBwMyoxSPLozKDvKacOyByJW8v3 4kNh2esMtf3yfowBbzfUn+zTXfS3wHiR1i+r48e+1q0q4r7JrMRSnJFoqMVcVJwIAFL/GkcB AgAA X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD033; 1:SPzys2FfxGMPOPnFQzB8ImyAUZmZ37Bt4w/fgVbT1Ke+674iwIZDi2qqm1yieO+1uk8D0k4mtG1vhz0usBTnr7S84Hp/27b4j0xj/Q6snc81hDOA8LHIm9cbHhWTDbUlYQGNjMfpltYTdm6NazS92FMEXMZBfm2zpi1csO+oajeQA02oFvgUo1PDHVsDofoq7DK/7/Biepi8R/+uDylHcCOZDaC8YYvCptLgc0eaI2syhSWcRJXdiHfgvRh2cb5QI5ZY91PbkUbqg93d28wToXIRXE6ML8a8CZwpqM18yCTb8/zS2ks+9SfWzYxevPDQJdai1Rpwh8Ypd5MttDLC9w== X-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(189002)(199003)(77096005)(87936001)(86362001)(92566002)(2950100001)(19580395003)(19580405001)(229853001)(53416004)(4001350100001)(36756003)(33656002)(77156002)(62966003)(65816999)(106466001)(54356999)(76176999)(50466002)(50986999)(83506001)(47776003)(110136002)(65806001)(5001960100002)(65956001)(5001920100001)(64126003)(46102003)(189998001)(23676002)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0201MB1539; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0201MB1539; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520003)(3002001); SRVR:BLUPR0201MB1539; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0201MB1539; X-Forefront-PRVS: 0597911EE1 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2015 22:57:21.7580 (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.172]; Helo=[milsmgep11.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0201MB1539 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Comment out the code that is never reached in qla83xx_idc_unlock() and also in qlt_set_data_offset() to avoid that static source code analysis tools report warnings for this code. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap Acked-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_os.c | 7 ++++++- drivers/scsi/qla2xxx/qla_target.c | 16 +++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 0ababd5..5a5166b 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -4417,7 +4417,10 @@ retry_lock2: void qla83xx_idc_unlock(scsi_qla_host_t *base_vha, uint16_t requester_id) { - uint16_t options = (requester_id << 15) | BIT_7, retry; +#if 0 + uint16_t options = (requester_id << 15) | BIT_7; +#endif + uint16_t retry; uint32_t data; struct qla_hw_data *ha = base_vha->hw; @@ -4453,6 +4456,7 @@ retry_unlock: return; +#if 0 /* XXX: IDC-unlock implementation using access-control mbx */ retry = 0; retry_unlock2: @@ -4468,6 +4472,7 @@ retry_unlock2: } return; +#endif } int diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 59a0897..22a91a3 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -3699,6 +3699,14 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha, static int qlt_set_data_offset(struct qla_tgt_cmd *cmd, uint32_t offset) { +#if 1 + /* + * FIXME: Reject non zero SRR relative offset until we can test + * this code properly. + */ + pr_debug("Rejecting non zero SRR rel_offs: %u\n", offset); + return -1; +#else struct scatterlist *sg, *sgp, *sg_srr, *sg_srr_start = NULL; size_t first_offset = 0, rem_offset = offset, tmp = 0; int i, sg_srr_cnt, bufflen = 0; @@ -3708,13 +3716,6 @@ static int qlt_set_data_offset(struct qla_tgt_cmd *cmd, uint32_t offset) "cmd->sg_cnt: %u, direction: %d\n", cmd, cmd->sg, cmd->sg_cnt, cmd->dma_data_direction); - /* - * FIXME: Reject non zero SRR relative offset until we can test - * this code properly. - */ - pr_debug("Rejecting non zero SRR rel_offs: %u\n", offset); - return -1; - if (!cmd->sg || !cmd->sg_cnt) { ql_dbg(ql_dbg_tgt, cmd->vha, 0xe055, "Missing cmd->sg or zero cmd->sg_cnt in" @@ -3797,6 +3798,7 @@ static int qlt_set_data_offset(struct qla_tgt_cmd *cmd, uint32_t offset) BUG(); return 0; +#endif } static inline int qlt_srr_adjust_data(struct qla_tgt_cmd *cmd,