All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "soc: qcom/spm: shut up uninitialized variable warning" has been added to the 4.4-stable tree
@ 2016-09-22 15:42 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-22 15:42 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    soc: qcom/spm: shut up uninitialized variable warning

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:
     soc-qcom-spm-shut-up-uninitialized-variable-warning.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 00affcac69c7aae6c2cfcbc71f724e1c16d0b445 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Sun, 17 Jan 2016 01:02:56 +0100
Subject: soc: qcom/spm: shut up uninitialized variable warning

From: Arnd Bergmann <arnd@arndb.de>

commit 00affcac69c7aae6c2cfcbc71f724e1c16d0b445 upstream.

gcc warns about the 'found' variable possibly being used uninitialized:

drivers/soc/qcom/spm.c: In function 'spm_dev_probe':
drivers/soc/qcom/spm.c:305:5: error: 'found' may be used uninitialized in this function [-Werror=maybe-uninitialized]

However, the code is correct because we know that there is
always at least one online CPU. This initializes the 'found'
variable to zero before the loop so the compiler knows
it does not have to warn about it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/soc/qcom/spm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/soc/qcom/spm.c
+++ b/drivers/soc/qcom/spm.c
@@ -288,7 +288,7 @@ static struct spm_driver_data *spm_get_d
 	struct spm_driver_data *drv = NULL;
 	struct device_node *cpu_node, *saw_node;
 	int cpu;
-	bool found;
+	bool found = 0;
 
 	for_each_possible_cpu(cpu) {
 		cpu_node = of_cpu_device_node_get(cpu);


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-4.4/mmc-dw_mmc-use-resource_size_t-to-store-physical-address.patch
queue-4.4/net-simplify-napi_synchronize-to-avoid-warnings.patch
queue-4.4/soc-qcom-spm-shut-up-uninitialized-variable-warning.patch
queue-4.4/kconfig-tinyconfig-provide-whole-choice-blocks-to-avoid-warnings.patch
queue-4.4/pinctrl-at91-pio4-use-pr-format-string-for-resource.patch

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

only message in thread, other threads:[~2016-09-22 15:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 15:42 Patch "soc: qcom/spm: shut up uninitialized variable warning" 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.