Skip to content

Commit

Permalink
percpu: kill compile warning in pcpu_populate_chunk()
Browse files Browse the repository at this point in the history
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@kernel.org>
Reported-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Tejun Heo committed Mar 1, 2009
1 parent 0093b10 commit 02d51fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 02d51fd

Please sign in to comment.