[tip:core/percpu] percpu: kill compile warning in pcpu_populate_chunk()

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

 



Commit-ID:  02d51fdfb2bfcf6bbd776f983177f55868aa0a79
Gitweb:     http://git.kernel.org/tip/02d51fdfb2bfcf6bbd776f983177f55868aa0a79
Author:     Tejun Heo <tj@xxxxxxxxxx>
AuthorDate: Sun, 1 Mar 2009 15:42:36 +0900
Commit:     Tejun Heo <tj@xxxxxxxxxx>
CommitDate: Sun, 1 Mar 2009 15:42:36 +0900

percpu: kill compile warning in pcpu_populate_chunk()

Impact: remove compile warning

Mark local variable map_end in pcpu_populate_chunk() with
uninitialized_var().  The variable is always used in tandem with
map_start and guaranteed to be initialized before use but gcc doesn't
understand that.

Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
Reported-by: Ingo Molnar <mingo@xxxxxxx>


---
 mm/percpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/percpu.c b/mm/percpu.c
index 5954e7a..3d0f545 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -639,7 +639,7 @@ static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size)
 	int page_start = PFN_DOWN(off);
 	int page_end = PFN_UP(off + size);
 	int map_start = -1;
-	int map_end;
+	int uninitialized_var(map_end);
 	unsigned int cpu;
 	int i;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux