linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/xive: Initialize symbol before usage
@ 2018-08-21 18:46 Breno Leitao
  2018-08-23  3:24 ` Michael Ellerman
  0 siblings, 1 reply; 7+ messages in thread
From: Breno Leitao @ 2018-08-21 18:46 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Benjamin Herrenschmidt, Breno Leitao

Function xive_native_get_ipi() might uses chip_id without it being
initialized. This gives the following error on 'smatch' tool:

	error: uninitialized symbol 'chip_id'

This patch simply sets chip_id initial value to 0.

CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 arch/powerpc/sysdev/xive/native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native.c
index 311185b9960a..fc56673a3c0f 100644
--- a/arch/powerpc/sysdev/xive/native.c
+++ b/arch/powerpc/sysdev/xive/native.c
@@ -239,7 +239,7 @@ static bool xive_native_match(struct device_node *node)
 static int xive_native_get_ipi(unsigned int cpu, struct xive_cpu *xc)
 {
 	struct device_node *np;
-	unsigned int chip_id;
+	unsigned int chip_id = 0;
 	s64 irq;
 
 	/* Find the chip ID */
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-09-20  4:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-21 18:46 [PATCH] powerpc/xive: Initialize symbol before usage Breno Leitao
2018-08-23  3:24 ` Michael Ellerman
2018-08-23  5:26   ` Cédric Le Goater
2018-08-23 12:25     ` Michael Ellerman
2018-08-23 23:26     ` [PATCH v2] powerpc/xive: Avoid unitialized variable Breno Leitao
2018-08-24  6:58       ` Cédric Le Goater
2018-09-20  4:20       ` [v2] " Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).