From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:59151 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932430AbcEBX4b (ORCPT ); Mon, 2 May 2016 19:56:31 -0400 Subject: Patch "megaraid_sas: add missing curly braces in ioctl handler" has been added to the 4.5-stable tree To: arnd@arndb.de, gregkh@linuxfoundation.org, hare@suse.com, martin.petersen@oracle.com, sumit.saxena@broadcom.com Cc: , From: Date: Mon, 02 May 2016 16:56:30 -0700 Message-ID: <146223339018732@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled megaraid_sas: add missing curly braces in ioctl handler to the 4.5-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: megaraid_sas-add-missing-curly-braces-in-ioctl-handler.patch and it can be found in the queue-4.5 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 3deb9438d34a09f6796639b652a01d110aca9f75 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 14 Mar 2016 15:29:45 +0100 Subject: megaraid_sas: add missing curly braces in ioctl handler From: Arnd Bergmann commit 3deb9438d34a09f6796639b652a01d110aca9f75 upstream. 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") Reviewed-by: Hannes Reinecke Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -6282,12 +6282,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); Patches currently in stable-queue which might be from arnd@arndb.de are queue-4.5/misc-bmp085-enable-building-as-a-module.patch queue-4.5/xen-kconfig-don-t-select-input_xen_kbddev_frontend.patch queue-4.5/arm-exynos-select-thermal_of.patch queue-4.5/regulator-s5m8767-fix-get_register-error-handling.patch queue-4.5/asm-generic-futex-re-enable-preemption-in-futex_atomic_cmpxchg_inatomic.patch queue-4.5/ntb-perf-test-fix-address-space-confusion.patch queue-4.5/paride-make-verbose-parameter-an-int-again.patch queue-4.5/arm-prima2-always-enable-reset-controller.patch queue-4.5/asoc-s3c24xx-use-const-snd_soc_component_driver-pointer.patch queue-4.5/scsi_dh-force-modular-build-if-scsi-is-a-module.patch queue-4.5/megaraid_sas-add-missing-curly-braces-in-ioctl-handler.patch