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:
Yihao Han 2021-10-31 20:03:17 -07:00 committed by Helge Deller
parent 55a2ed7601
commit 1ae8e91e81
1 changed files with 1 additions and 5 deletions

View File

@ -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]);
}
}