From patchwork Mon Mar 14 14:29:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102588 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp70420lbc; Mon, 14 Mar 2016 07:31:08 -0700 (PDT) X-Received: by 10.98.1.197 with SMTP id 188mr30468481pfb.8.1457965868570; Mon, 14 Mar 2016 07:31:08 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m67si6809285pfi.45.2016.03.14.07.31.08; Mon, 14 Mar 2016 07:31:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965250AbcCNOa4 (ORCPT + 31 others); Mon, 14 Mar 2016 10:30:56 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:57076 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932864AbcCNOau (ORCPT ); Mon, 14 Mar 2016 10:30:50 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0LmuGy-1aBeSw0eGS-00h2i4; Mon, 14 Mar 2016 15:30:14 +0100 From: Arnd Bergmann To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, Adaptec OEM Raid Solutions , "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Johannes Thumshirn , Tomas Henzl , Mahesh Rajashekhara , Raghava Aditya Renukunta , Fengguang Wu Subject: [PATCH 1/3] aacraid: add missing curly braces Date: Mon, 14 Mar 2016 15:29:43 +0100 Message-Id: <1457965789-3373916-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457965789-3373916-1-git-send-email-arnd@arndb.de> References: <1457965789-3373916-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:tZ3PF1flLyNf9KNymC/UmKBRxITIFTE9Z84p/UMdXMzDwJCxRss Wn8HjB8roqcVAS1jGANmt/Wrotxmv2T1RZXHM3keCM6VS4UrPSBFnvIhB6856xE2nXazMRU SivdKGYE8sJIQoCvelaXM4T3prj76Zs5qgfc4ihqiG0L4QLQzMdWQZGk2fWmVI/5O92hMbf klgqoVWdt/gjzfPBRuQbg== X-UI-Out-Filterresults: notjunk:1; V01:K0:G2kOh2X94W8=:0rUA0OKHfNWnYPUbfqxoMg F57slL80ccYNom7kKG4MkgkfTOL4yCsrvIxRROpu/ATebNXH7s4uXK/M2l6jfdXPUIawuqhwb ICFyQUsLp9eJjC4sgmYC/RE6vWbsAj7T1lD87Muc7nX6NEyhE2zlNMr1c+N6P+B/YqStNjN8o 1WfJOski0C14IvPzcprKGVbKcCa2odX+QjvHDXYvPdsuzdC13VuqeCUxFafBhM3gNE0Jpgoyr MC50SfHGqEeCcfj9m05BDbMr6RZ2kUXL5vTrrkfvs9kePjbpQs+pyKEum7+ZQpuX0yPdj/J0b 4BOWDjNxhoJ5QE1t6dWtLAuOXIq9FVGgtgKbScQqb7nBMtLOdkj4ktyJu5QB1SGgp5ftRINwW Q6ElxhPvrkqTJSswNI8TP3j7jOWfu5ZxfUOPHcQ3ke0SUZsRsZrw4hcEl9xqHtkizjBST/5cH bmsqWR33cDu8QzO2Lh1u4t1foEouzlGf/16fjSfQ3Pxc5qeVJ3iYy6mS8QaWSkL3WvPKyuv2+ 19Zxpv23SAWn4WjCOozuhAh/OLi+tEp63sH+MOPYDMggjBGaDBw9I/9zHPsZytY/5vPGuT488 YU6nZUEIiijdLuvGRDtwCTxMZRWCJiFenoC/sqHrGN/eDlDuDA7GTh+HxwTUl9pKG4bYcQfr9 fpwjXQ4yu9q7THHH1CwE1exEpYe3jNGXmeNO0tPn5LkhZv2wFcAn8ADCCprYA0hSytHs= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc-6 warns about obviously wrong indentation for newly added code in aac_slave_configure(): drivers/scsi/aacraid/linit.c: In function 'aac_slave_configure': drivers/scsi/aacraid/linit.c:458:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] sdev->tagged_supported = 1; ^~~~ drivers/scsi/aacraid/linit.c:455:4: note: ...this 'else' clause, but it is not gcc is correct, and evidently this was meant to be within the curly braces that should have been there to start with. This patch adds them, which avoids the warning and makes it clear what was intended here. Nothing changes in behavior because in the 'if' block, the sdev->tagged_supported flag is known to be set already. Signed-off-by: Arnd Bergmann Fixes: 6bf3b630d0a7 ("aacraid: SCSI blk tag support") --- drivers/scsi/aacraid/linit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 21a67ed047e8..ff6caab8cc8b 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -452,10 +452,11 @@ static int aac_slave_configure(struct scsi_device *sdev) else if (depth < 2) depth = 2; scsi_change_queue_depth(sdev, depth); - } else + } else { scsi_change_queue_depth(sdev, 1); sdev->tagged_supported = 1; + } return 0; } From patchwork Mon Mar 14 14:29:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102587 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp70619lbc; Mon, 14 Mar 2016 07:31:26 -0700 (PDT) X-Received: by 10.66.65.228 with SMTP id a4mr36699145pat.4.1457965886742; Mon, 14 Mar 2016 07:31:26 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ju17si8061537pab.5.2016.03.14.07.31.26; Mon, 14 Mar 2016 07:31:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965306AbcCNObI (ORCPT + 31 others); Mon, 14 Mar 2016 10:31:08 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:57679 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965276AbcCNObD (ORCPT ); Mon, 14 Mar 2016 10:31:03 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0Lvjxc-1ZlDk3444K-017Xn2; Mon, 14 Mar 2016 15:30:40 +0100 From: Arnd Bergmann To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, Kashyap Desai , Sumit Saxena , Uday Lingala , "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Tomas Henzl , Bjorn Helgaas , megaraidlinux.pdl@avagotech.com Subject: [PATCH 3/3] megaraid_sas: add missing curly braces in ioctl handler Date: Mon, 14 Mar 2016 15:29:45 +0100 Message-Id: <1457965789-3373916-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457965789-3373916-1-git-send-email-arnd@arndb.de> References: <1457965789-3373916-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:mOSVU53TaEHHMn7cZyVYcuHFH9mqpdImWdLZ75VNAPkGsVD+/kU kkad9WBUseJhbymsuW6qkGz5R0lhJdn0tm+dPBzcl3TsGdD4m3cW3Sp6WmhLXO7AaFiLksc stsVPYHWM5dkxpu93vL7+Ja3YoHKY7mipizjf6VhpE2Lezc5ddrleCJT6heDki0QznSW+Fi ku11ltkcxhxdBJKnpDzsQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:LtE6+u9lox8=:6qb15QMVPkLDTNfPYLy3Ki VFQEn635tYtKdBGXugiCXpCe81gvV6NtxuvD8hX08tA+chfoSI5cmSJSEsyU41wkub8LOV2MK Gtn7yXi/oV4p+8SpRQXktoSR0DiHEns3dKM2BSH7ogTBVwz24KLXzdX5KyOFPWda2cPnRHKv1 9A4MW1Q8uRGJzds2ZbusHPQFHuYPeMWzWP9UnDDNjFod3YRyRVx2NVPfq11RYAjRzTjQgkuEk 4AOEgrMweSc6YBpfh8WMj6BgOvN3WkPlnWYnwsjS9u6JiQRpG0mcY+KSuCpeF2LI4umJynkDc bHHYX4i4TxCn+eiwYXNtMqCRo9bbKQTR5h+uBwEpc+FsQ/sMVmprBcdzcb0CyKJX+YQjl7MUC rI07XSzkwVhedXkUqtyRINxai+6s0OPymu2XKgqzAzPeaxydVE9zJMeIV1e/wxKjNXYdAOduo ha7zuhqB4PSIj9PLzNJxk87dbJ5K9+vfJC9gX24Dz0M4CmSphVqcTOV+KV9s3b0kgs8J1KsK5 AjofwJSqdAJExRrCp18/+Xmf0JcSjue84MAZhNnL5oLC/ur5qOhLihDWMbt9s9Y3B5+qRnKxB smvtWUeXG77B0vKZ3p8dOGaWVZanh21GCXdZYCcfJgcz465HeIYbSK9c5kj9KF+r3+0qUMOO6 f3f2+1BbfnyS7PUzhhj5pOrmy4gO3WWDn/Bzkxe1Jp2i2diagwkgWIWtKjCZpLYK+sAI= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc-6 found a dubious indentation in the megasas_mgmt_fw_ioctl function: drivers/scsi/megaraid/megaraid_sas_base.c: In function 'megasas_mgmt_fw_ioctl': drivers/scsi/megaraid/megaraid_sas_base.c:6658:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] kbuff_arr[i] = NULL; ^~~~~~~~~ drivers/scsi/megaraid/megaraid_sas_base.c:6653:3: note: ...this 'if' clause, but it is not if (kbuff_arr[i]) ^~ The code is actually correct, as there is no downside in clearing a NULL pointer again. This clarifies the code and avoids the warning by adding extra curly braces. Signed-off-by: Arnd Bergmann Fixes: 90dc9d98f01b ("megaraid_sas : MFI MPT linked list corruption fix") --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 5c08568ccfbf..2627200d4f82 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -6650,12 +6650,13 @@ out: } for (i = 0; i < ioc->sge_count; i++) { - if (kbuff_arr[i]) + if (kbuff_arr[i]) { dma_free_coherent(&instance->pdev->dev, le32_to_cpu(kern_sge32[i].length), kbuff_arr[i], le32_to_cpu(kern_sge32[i].phys_addr)); kbuff_arr[i] = NULL; + } } megasas_return_cmd(instance, cmd);