mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 22:24:11 +08:00
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;
|
||||
|
||||
for (j = i; j > 0; j--) {
|
||||
physmem_range_t tmp;
|
||||
|
||||
if (pmem_ranges[j-1].start_pfn <
|
||||
pmem_ranges[j].start_pfn) {
|
||||
|
||||
break;
|
||||
}
|
||||
tmp = pmem_ranges[j-1];
|
||||
pmem_ranges[j-1] = pmem_ranges[j];
|
||||
pmem_ranges[j] = tmp;
|
||||
swap(pmem_ranges[j-1], pmem_ranges[j]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user