Commit 1ae8e91e authored by Yihao Han's avatar Yihao Han Committed by Helge Deller

parisc: Use swap() to swap values in setup_bootmem()

Signed-off-by: default avatarYihao Han <hanyihao@vivo.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 55a2ed76
...@@ -127,16 +127,12 @@ static void __init setup_bootmem(void) ...@@ -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;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment