All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: benh@kernel.crashing.org, Jimi Xenidis <jimix@pobox.com>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc: fix uninitialised error in numa.c
Date: Wed, 20 Jun 2012 14:17:47 +1000	[thread overview]
Message-ID: <20741.1340165867@neuling.org> (raw)

chroma_defconfig currently gives me this with gcc 4.6:
  arch/powerpc/mm/numa.c:638:13: error: 'dm' may be used uninitialized in this function [-Werror=uninitialized]

It's a bogus warning since of_get_drconf_memory() only writes it
anyway.  

Signed-off-by: Michael Neuling <mikey@neuling.org>
cc: stable@kernel.org
---
Also affects 3.4 and 3.3 stable.

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 5ca3a15..880acde 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -637,7 +637,7 @@ static inline int __init read_usm_ranges(const u32 **usm)
  */
 static void __init parse_drconf_memory(struct device_node *memory)
 {
-	const u32 *dm, *usm;
+	const u32 *dm = NULL, *usm;
 	unsigned int n, rc, ranges, is_kexec_kdump = 0;
 	unsigned long lmb_size, base, size, sz;
 	int nid;

             reply	other threads:[~2012-06-20  4:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  4:17 Michael Neuling [this message]
2012-06-20  5:38 ` [PATCH] powerpc: fix uninitialised error in numa.c Tony Breeds
2012-06-20  5:46   ` Michael Neuling
2012-06-20  6:01     ` Michael Neuling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20741.1340165867@neuling.org \
    --to=mikey@neuling.org \
    --cc=benh@kernel.crashing.org \
    --cc=jimix@pobox.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.