summaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/unwind.c
diff options
context:
space:
mode:
authorYihao Han <hanyihao@vivo.com>2021-11-10 04:07:12 +0100
committerVineet Gupta <vineetg@rivosinc.com>2021-12-29 04:49:44 +0100
commit8f67f65d121cc3bbb4ffaae80e880aeb307d49f4 (patch)
tree7ae4dd9dc0f29d8675638ddfbb23878252122605 /arch/arc/kernel/unwind.c
parentarc: perf: Move static structs to where they're really used (diff)
downloadlinux-8f67f65d121cc3bbb4ffaae80e880aeb307d49f4.tar.xz
linux-8f67f65d121cc3bbb4ffaae80e880aeb307d49f4.zip
arc: use swap() to make code cleaner
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>
Diffstat (limited to 'arch/arc/kernel/unwind.c')
-rw-r--r--arch/arc/kernel/unwind.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
index 9e28058cdba8..200270a94558 100644
--- a/arch/arc/kernel/unwind.c
+++ b/arch/arc/kernel/unwind.c
@@ -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,