summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorYihao Han <hanyihao@vivo.com>2021-10-31 20:03:17 -0700
committerHelge Deller <deller@gmx.de>2021-11-01 11:59:49 +0100
commit1ae8e91e814d2b9ff1a2f336e1ed1db55dd42289 (patch)
treee11fbbc231c224fb0e76e58903ff7bfcc04dac33 /arch
parent55a2ed7601663f52321b93efb3355400fc38d062 (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/mm/init.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 65f50f072a87..1ae31db9988f 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -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]);
}
}