]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
arc: use swap() to make code cleaner
authorYihao Han <hanyihao@vivo.com>
Wed, 10 Nov 2021 03:07:12 +0000 (19:07 -0800)
committerVineet Gupta <vineetg@rivosinc.com>
Wed, 29 Dec 2021 03:49:44 +0000 (19:49 -0800)
Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.

Signed-off-by: Yihao Han <hanyihao@vivo.com>
Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
arch/arc/kernel/unwind.c

index 9e28058cdba85930d0697056b3017a1900f75016..200270a94558bed37409ac631815d90516a0d2b8 100644 (file)
@@ -245,14 +245,9 @@ static void swap_eh_frame_hdr_table_entries(void *p1, void *p2, int size)
 {
        struct eh_frame_hdr_table_entry *e1 = p1;
        struct eh_frame_hdr_table_entry *e2 = p2;
-       unsigned long v;
-
-       v = e1->start;
-       e1->start = e2->start;
-       e2->start = v;
-       v = e1->fde;
-       e1->fde = e2->fde;
-       e2->fde = v;
+
+       swap(e1->start, e2->start);
+       swap(e1->fde, e2->fde);
 }
 
 static void init_unwind_hdr(struct unwind_table *table,