parisc: Use swap() to swap values in setup_bootmem()
Signed-off-by: Yihao Han <hanyihao@vivo.com> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
55a2ed7601
commit
1ae8e91e81
|
@ -127,16 +127,12 @@ static void __init setup_bootmem(void)
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
for (j = i; j > 0; j--) {
|
for (j = i; j > 0; j--) {
|
||||||
physmem_range_t tmp;
|
|
||||||
|
|
||||||
if (pmem_ranges[j-1].start_pfn <
|
if (pmem_ranges[j-1].start_pfn <
|
||||||
pmem_ranges[j].start_pfn) {
|
pmem_ranges[j].start_pfn) {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tmp = pmem_ranges[j-1];
|
swap(pmem_ranges[j-1], pmem_ranges[j]);
|
||||||
pmem_ranges[j-1] = pmem_ranges[j];
|
|
||||||
pmem_ranges[j] = tmp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue