Re: linux-next: build warning after merge of the tip tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wu Fengguang wrote:
On Fri, Sep 03, 2010 at 10:12:01AM +0800, Stephen Rothwell wrote:
On Fri, 3 Sep 2010 12:10:23 +1000 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

arch/x86/mm/init_64.c: In function 'kernel_physical_mapping_init':
arch/x86/mm/init_64.c:601: warning: 'addr' may be used uninitialized in this function

The code does look suspicious ... 'addr' gets declared and then passed to
a function, but is not set anywhere ...
Forgot to say:

Introduced by commit 9b861528a8012e7bc4d1f7bae07395b225331477 ("x86-64,
mem: Update all PGDs for direct mapping and vmemmap mapping changes").


The original patch has the following line, however get lost some time
later:

        http://www.spinics.net/lists/linux-mm/msg08152.html

===
x86, mm: fix uninitialized addr in kernel_physical_mapping_init()

This re-adds the lost chunk in commit 9b861528a80.

CC: Haicheng Li <haicheng.li@xxxxxxxxxxxxxxx>
Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 64e7bc2..74f0f35 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -570,6 +570,7 @@ kernel_physical_mapping_init(unsigned long start,
start = (unsigned long)__va(start);
 	end = (unsigned long)__va(end);
+	addr = start;

weird, this line was in my original patch: http://lkml.org/lkml/2010/8/20/166

Acked-by: Haicheng Li <haicheng.li@xxxxxxxxxxxxxxx>

 	for (; start < end; start = next) {
 		pgd_t *pgd = pgd_offset_k(start);

--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux