All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "megaraid_sas: add missing curly braces in ioctl handler" has been added to the 4.4-stable tree
@ 2016-05-02 23:56 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-05-02 23:56 UTC (permalink / raw)
  To: arnd, gregkh, hare, martin.petersen, sumit.saxena; +Cc: stable, stable-commits


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.4-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.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 3deb9438d34a09f6796639b652a01d110aca9f75 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 14 Mar 2016 15:29:45 +0100
Subject: megaraid_sas: add missing curly braces in ioctl handler

From: Arnd Bergmann <arnd@arndb.de>

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 <arnd@arndb.de>
Fixes: 90dc9d98f01b ("megaraid_sas : MFI MPT linked list corruption fix")
Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 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.4/misc-bmp085-enable-building-as-a-module.patch
queue-4.4/xen-kconfig-don-t-select-input_xen_kbddev_frontend.patch
queue-4.4/arm-exynos-select-thermal_of.patch
queue-4.4/regulator-s5m8767-fix-get_register-error-handling.patch
queue-4.4/asm-generic-futex-re-enable-preemption-in-futex_atomic_cmpxchg_inatomic.patch
queue-4.4/regulator-core-fix-nested-locking-of-supplies.patch
queue-4.4/paride-make-verbose-parameter-an-int-again.patch
queue-4.4/regulator-core-fix-regulator_lock_supply-regression.patch
queue-4.4/arm-prima2-always-enable-reset-controller.patch
queue-4.4/asoc-s3c24xx-use-const-snd_soc_component_driver-pointer.patch
queue-4.4/scsi_dh-force-modular-build-if-scsi-is-a-module.patch
queue-4.4/megaraid_sas-add-missing-curly-braces-in-ioctl-handler.patch
queue-4.4/revert-regulator-core-fix-nested-locking-of-supplies.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-02 23:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-02 23:56 Patch "megaraid_sas: add missing curly braces in ioctl handler" has been added to the 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.