From patchwork Thu Jul 9 14:25:46 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: 6756491 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B06319F380 for ; Thu, 9 Jul 2015 14:25:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90D9E206A5 for ; Thu, 9 Jul 2015 14:25:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F629205EE for ; Thu, 9 Jul 2015 14:25:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751723AbbGIOZz (ORCPT ); Thu, 9 Jul 2015 10:25:55 -0400 Received: from mail-bn1bon0089.outbound.protection.outlook.com ([157.56.111.89]:29452 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750967AbbGIOZx (ORCPT ); Thu, 9 Jul 2015 10:25:53 -0400 Received: from CY1PR0201CA0025.namprd02.prod.outlook.com (10.163.30.163) by BN1PR0201MB0737.namprd02.prod.outlook.com (10.160.169.24) with Microsoft SMTP Server (TLS) id 15.1.213.14; Thu, 9 Jul 2015 14:25:51 +0000 Received: from BL2FFO11FD006.protection.gbl (2a01:111:f400:7c09::190) by CY1PR0201CA0025.outlook.office365.com (2a01:111:e400:58b9::35) with Microsoft SMTP Server (TLS) id 15.1.213.14 via Frontend Transport; Thu, 9 Jul 2015 14:25:51 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.173) 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.173 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.173; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.173) by BL2FFO11FD006.mail.protection.outlook.com (10.173.161.2) with Microsoft SMTP Server id 15.1.213.8 via Frontend Transport; Thu, 9 Jul 2015 14:25:48 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep12.sandisk.com (Symantec Messaging Gateway) with SMTP id D1.2A.06265.B648E955; Thu, 9 Jul 2015 07:25:47 -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, 9 Jul 2015 07:25:47 -0700 X-AuditID: ac160a69-f790f6d000001879-a5-559e846bbbd2 Received: from [10.50.231.57] ( [10.177.8.100]) by milsmgip12.sandisk.com (Symantec Messaging Gateway) with SMTP id 61.5D.04661.A648E955; Thu, 9 Jul 2015 07:25:47 -0700 (PDT) Message-ID: <559E846A.20605@sandisk.com> Date: Thu, 9 Jul 2015 07:25:46 -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 v3 10/10] qla2xxx: Avoid that sparse complains about context imbalances References: <559E8382.6030803@sandisk.com> In-Reply-To: <559E8382.6030803@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGLMWRmVeSWpSXmKPExsWyRoxnkW52y7xQg79LLCxe/HjCavF//W0W i+7rO9gsrt14y2wxf+ZfVgdWj8M/fjB7rPtygt3j8ya5AOYoLpuU1JzMstQifbsEroyjHc+Z ChabVdz9cYexgbFRt4uRk0NCwETi7av7rBC2mMSFe+vZuhi5OIQETjBKXPq/nQUkISSwnVFi eS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4vft1i0dOPPqbH6i8+yrj++KvG/LJNqmFS 0wJkWZZ/0Q7mTEqznbT+jP+9xew7V0ksV42J+h2xS9t474bDunnhS+Zn9S9Y5Z1rJsu4emJr 6dJUlZTHLmr/BBtT5NvO/2J7NCv5R+dU/b9LmQ65mx+9pL5ZiaU4I9FQi7moOBEAwDB6ZQIC AAA= X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD006; 1:AKxUC6CVdlqXwiPps2X9n4CzJIVsyaGXHhkVmwmlhDCVNgXdDGV9MoQEBDTDDYJQU1Ky+f+LGWkva6jX3OIf78LqtObQ52nemFcPVksq0+DDdg7cL4M9rJzMr98ceSqGzcuVexy9NvnzdHmimLS6b8ccFMnt6fKvrmLiRNfAJx8R/VY0RgGme7roZgmbsMNXIiL2gPzqgmE7p8Ik/SgoKe64ba1Pck515HWeLxeMKjx7nUxWcDRFydYyiUwMO9JY5Ow1hwiBFt9qXs+2inKlf6fYgPZPyDdm6Kmbi8CSC9EFMeXV4jdrzSSYrCzoeshILCftv5On+7z7KyykWsxHFw9P3KveGlhRT51/M7DE6SpBQCvrerzsIYgoZ/UgESo064GLc5f5CyrQ+4QydmjcqYDALRw5KYoTXMpCSzLfIK0= X-Forefront-Antispam-Report: CIP:63.163.107.173; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(87936001)(86362001)(575784001)(23676002)(62966003)(64126003)(77156002)(46102003)(19580405001)(19580395003)(54356999)(65816999)(76176999)(50986999)(4001350100001)(83506001)(92566002)(77096005)(33656002)(50466002)(106466001)(2950100001)(229853001)(189998001)(36756003)(5001960100002)(110136002)(65956001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0201MB0737; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0737; 2:a1UXqRvLZAZznXlZaq1irG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ehu/SBimLf++wCEbIr9olgcyQKBmHTyqLyE3vq8iEwE3Agxkj65qk8RNn+XuFdBxDp4DCleXn84jA4mpYlVsYrYYdJcjnnSWqfm/9cAraxbnE27eddDZQ3Gm; 4:sRIPcnUVKlqHWL7bp+gxrKX6clHBBHrhlZ/rhFHi1TMwfAlI6Od9AYyBucgI4v0u1NKN1S76ifvKlpC9Sf/sktvsNiNfJ1vjT/1AxqzOVMBE51TY9iFwBbLglqgJOU5AyFPgISU0qlM/s9G+uI6lxCEku53VY+S5rw2lmqD2jIqN0orODdeTpJrYxOWboYqVCgJZQ60qmtDvrSX+ru3odLv5LwMs7LPI64u2y1yRFXR5LCA3BTz2UvUXxYgTW1vjqVcksUP/rwsjqqqFwDgj/ajiP4GQg9+ygmyqehXtyK8= BN1PR0201MB0737: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BN1PR0201MB0737; BCL:0; PCL:0; RULEID:; SRVR:BN1PR0201MB0737; X-Forefront-PRVS: 0632519F33 X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0737; 23:4H+W9mqiRpWw3IG6rXXrI7/sSnLr/noRKJMFUFsiQw25eouxIaoR2rabJJohINic32Fz9q6cz0yegMU4/kxP/aHOvl8vqMQ/TxIlNpWy6RQjfgqvcoxiFjHxTweCHj0Htnds7VoTwiDCnpEXuxcmBrMX+TGTWhawjml3GaTsLdp4QE9D1UeQ5eV5rKwfmCtN88GBIvepSW6wMuWfnM4Eokgc3eizgOePlrnVSRzfJDc3iNA+1TPu+i6+6lMyDz4uIG4CT/SESUa3lGAXouYJ0oe8/anap4z5hx+YUmJWBdZw+IwljLD3FMjQW9HIax4K6UCIbGDZ3LcB13yn/O8uL5Wie3jGh8n3+aD7kScXHYr+85LwQUnGsmv5YO1OZHi5pvjw2TW+ueEDu54epTqcol++iyjjy/+ROcyNUsr5VBC10UQ93muvwLVD/ymkj8ShkgzpZ1xI7OvX9AUb3GLlHqT0fzUSctt7b2oe5wP8Aho+Zno/sxspgB8ihkQF9MeoPz3ovy8otEcizMCS8ctxQVYTKzIwYa5lVAMZTA5wc86XFORnCBSe3IyoSywjxsq6MMjOTLjY93PFRW+wXS/DW9DQxlb7J3wc6RmwMohXhHM5AgH5XXLKKCZdrSjFo7/Igqr2INaQ+0ZujESTlayiwyhB7Chy6rLK+lpJQg557u6QbXm6XK60tNa6vND1NGSGXKolzJKz+52ab1nyS2iq0Vszd3tZbV+C9sMeRyU/ObMCh7kbImAIaMISm3v7BoX7LStmFxocDdcisbd8VUMyibzEt02UjAwtVMOD6wxyxUVLXx/5CywlB+AN8qaoOGGQYdDLaLdFy3oGJj5HDbBB0kuxRbXIWen+F2ZSquWQiX3itQww+Cz4XXG87qoi2atu X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0737; 5:WJI3O6vHkUudKpDTxtZtNiQsgSu9J9hlJrTy3eP/jj4EPmCHMyK28h6ir2bpb/mHbLbXwBzqQEv4zWR9go57wK4T7G2Kzj5N86beIRwHC5zpJ9CTK/0VLI0LbRlJmrvg3C8lu2fVdTlV6Pyx/WMu/g==; 24:L8ck+CEfDVIk+YhSkwOiigC/lB6D9tZ3GatgeJRIABoSXYIX7gWYsUlI3G5sC1HSvREeC7k43oFdmIg8WmAlUMVLXKmnNopNeReoef0KPYM=; 20:t7G0mYYKiLFtyubzPTB7NYnaTNT0x3V4BJK2pXum26/wIh5Q/jT7R2ycYbcXbCUWyLyrocxcD248SXQ5uSHdlSNjP+sWlyPE86e+YcFI5xKdq2EPNWo7Q9RXNWZhB9m8+kBqmu1PxRTo+Wo3QWPspHcNihsQ2E9O3sXkTgNSTPk= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2015 14:25:48.2244 (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.173]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0201MB0737 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Surround conditional locking statements with "#ifndef __CHECKER__" / "#endif" to hide these for the sparse static source code analysis tool. Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_dbg.c | 36 ++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_nx.c | 8 ++++++++ drivers/scsi/qla2xxx/qla_target.c | 4 ++++ drivers/scsi/qla2xxx/qla_tmpl.c | 4 ++++ 4 files changed, 52 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 1a1a221..583d52a 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -695,8 +695,10 @@ qla2300_fw_dump(scsi_qla_host_t *vha, int hardware_locked) flags = 0; +#ifndef __CHECKER__ if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); +#endif if (!ha->fw_dump) { ql_log(ql_log_warn, vha, 0xd002, @@ -832,8 +834,12 @@ qla2300_fw_dump(scsi_qla_host_t *vha, int hardware_locked) qla2xxx_dump_post_process(base_vha, rval); qla2300_fw_dump_failed: +#ifndef __CHECKER__ if (!hardware_locked) spin_unlock_irqrestore(&ha->hardware_lock, flags); +#else + ; +#endif } /** @@ -859,8 +865,10 @@ qla2100_fw_dump(scsi_qla_host_t *vha, int hardware_locked) mb0 = mb2 = 0; flags = 0; +#ifndef __CHECKER__ if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); +#endif if (!ha->fw_dump) { ql_log(ql_log_warn, vha, 0xd004, @@ -1030,8 +1038,12 @@ qla2100_fw_dump(scsi_qla_host_t *vha, int hardware_locked) qla2xxx_dump_post_process(base_vha, rval); qla2100_fw_dump_failed: +#ifndef __CHECKER__ if (!hardware_locked) spin_unlock_irqrestore(&ha->hardware_lock, flags); +#else + ; +#endif } void @@ -1057,8 +1069,10 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) flags = 0; ha->fw_dump_cap_flags = 0; +#ifndef __CHECKER__ if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); +#endif if (!ha->fw_dump) { ql_log(ql_log_warn, vha, 0xd006, @@ -1282,8 +1296,12 @@ qla24xx_fw_dump_failed_0: qla2xxx_dump_post_process(base_vha, rval); qla24xx_fw_dump_failed: +#ifndef __CHECKER__ if (!hardware_locked) spin_unlock_irqrestore(&ha->hardware_lock, flags); +#else + ; +#endif } void @@ -1305,8 +1323,10 @@ qla25xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) flags = 0; ha->fw_dump_cap_flags = 0; +#ifndef __CHECKER__ if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); +#endif if (!ha->fw_dump) { ql_log(ql_log_warn, vha, 0xd008, @@ -1598,8 +1618,12 @@ qla25xx_fw_dump_failed_0: qla2xxx_dump_post_process(base_vha, rval); qla25xx_fw_dump_failed: +#ifndef __CHECKER__ if (!hardware_locked) spin_unlock_irqrestore(&ha->hardware_lock, flags); +#else + ; +#endif } void @@ -1621,8 +1645,10 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) flags = 0; ha->fw_dump_cap_flags = 0; +#ifndef __CHECKER__ if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); +#endif if (!ha->fw_dump) { ql_log(ql_log_warn, vha, 0xd00a, @@ -1916,8 +1942,12 @@ qla81xx_fw_dump_failed_0: qla2xxx_dump_post_process(base_vha, rval); qla81xx_fw_dump_failed: +#ifndef __CHECKER__ if (!hardware_locked) spin_unlock_irqrestore(&ha->hardware_lock, flags); +#else + ; +#endif } void @@ -1939,8 +1969,10 @@ qla83xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) flags = 0; ha->fw_dump_cap_flags = 0; +#ifndef __CHECKER__ if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); +#endif if (!ha->fw_dump) { ql_log(ql_log_warn, vha, 0xd00c, @@ -2419,8 +2451,12 @@ qla83xx_fw_dump_failed_0: qla2xxx_dump_post_process(base_vha, rval); qla83xx_fw_dump_failed: +#ifndef __CHECKER__ if (!hardware_locked) spin_unlock_irqrestore(&ha->hardware_lock, flags); +#else + ; +#endif } /****************************************************************************/ diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index bb0ee7c..eb0cc54 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -476,7 +476,9 @@ qla82xx_wr_32(struct qla_hw_data *ha, ulong off_in, u32 data) BUG_ON(rv == -1); if (rv == 1) { +#ifndef __CHECKER__ write_lock_irqsave(&ha->hw_lock, flags); +#endif qla82xx_crb_win_lock(ha); qla82xx_pci_set_crbwindow_2M(ha, off_in, &off); } @@ -485,7 +487,9 @@ qla82xx_wr_32(struct qla_hw_data *ha, ulong off_in, u32 data) if (rv == 1) { qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM7_UNLOCK)); +#ifndef __CHECKER__ write_unlock_irqrestore(&ha->hw_lock, flags); +#endif } return 0; } @@ -503,7 +507,9 @@ qla82xx_rd_32(struct qla_hw_data *ha, ulong off_in) BUG_ON(rv == -1); if (rv == 1) { +#ifndef __CHECKER__ write_lock_irqsave(&ha->hw_lock, flags); +#endif qla82xx_crb_win_lock(ha); qla82xx_pci_set_crbwindow_2M(ha, off_in, &off); } @@ -511,7 +517,9 @@ qla82xx_rd_32(struct qla_hw_data *ha, ulong off_in) if (rv == 1) { qla82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM7_UNLOCK)); +#ifndef __CHECKER__ write_unlock_irqrestore(&ha->hw_lock, flags); +#endif } return data; } diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 445af44..6b7736d 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -3955,16 +3955,20 @@ static void qlt_reject_free_srr_imm(struct scsi_qla_host *vha, struct qla_hw_data *ha = vha->hw; unsigned long flags = 0; +#ifndef __CHECKER__ if (!ha_locked) spin_lock_irqsave(&ha->hardware_lock, flags); +#endif qlt_send_notify_ack(vha, (void *)&imm->imm_ntfy, 0, 0, 0, NOTIFY_ACK_SRR_FLAGS_REJECT, NOTIFY_ACK_SRR_REJECT_REASON_UNABLE_TO_PERFORM, NOTIFY_ACK_SRR_FLAGS_REJECT_EXPL_NO_EXPL); +#ifndef __CHECKER__ if (!ha_locked) spin_unlock_irqrestore(&ha->hardware_lock, flags); +#endif kfree(imm); } diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c index f4eb655..ddbe2e7 100644 --- a/drivers/scsi/qla2xxx/qla_tmpl.c +++ b/drivers/scsi/qla2xxx/qla_tmpl.c @@ -939,8 +939,10 @@ qla27xx_fwdump(scsi_qla_host_t *vha, int hardware_locked) { ulong flags = 0; +#ifndef __CHECKER__ if (!hardware_locked) spin_lock_irqsave(&vha->hw->hardware_lock, flags); +#endif if (!vha->hw->fw_dump) ql_log(ql_log_warn, vha, 0xd01e, "fwdump buffer missing.\n"); @@ -953,6 +955,8 @@ qla27xx_fwdump(scsi_qla_host_t *vha, int hardware_locked) else qla27xx_execute_fwdt_template(vha); +#ifndef __CHECKER__ if (!hardware_locked) spin_unlock_irqrestore(&vha->hw->hardware_lock, flags); +#endif }