[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170071553964024@myt2-dc4bba9bb23c.qloud-c.yandex.net>
Date: Sat, 30 Mar 2019 19:40:24 +0300
From: Andrey Abramov <st5pub@...dex.ru>
To: "vgupta@...opsys.com" <vgupta@...opsys.com>,
"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
"paulus@...ba.org" <paulus@...ba.org>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
"x86@...nel.org" <x86@...nel.org>,
"mark@...heh.com" <mark@...heh.com>,
"jlbec@...lplan.org" <jlbec@...lplan.org>,
"richard@....at" <richard@....at>,
"dedekind1@...il.com" <dedekind1@...il.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>,
"jpoimboe@...hat.com" <jpoimboe@...hat.com>,
Dave Chinner <dchinner@...hat.com>,
"darrick.wong@...cle.com" <darrick.wong@...cle.com>,
"ard.biesheuvel@...aro.org" <ard.biesheuvel@...aro.org>,
George Spelvin <lkml@....org>,
"linux-snps-arc@...ts.infradead.org"
<linux-snps-arc@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"ocfs2-devel@....oracle.com" <ocfs2-devel@....oracle.com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>
Cc: "rppt@...ux.ibm.com" <rppt@...ux.ibm.com>,
Morton Andrew <akpm@...ux-foundation.org>,
"mhocko@...e.com" <mhocko@...e.com>,
"malat@...ian.org" <malat@...ian.org>,
"npiggin@...il.com" <npiggin@...il.com>,
"yamada.masahiro@...ionext.com" <yamada.masahiro@...ionext.com>,
"jannh@...gle.com" <jannh@...gle.com>,
"jslaby@...e.cz" <jslaby@...e.cz>,
"ge.changwei@....com" <ge.changwei@....com>,
"jiangyiwen@...wei.com" <jiangyiwen@...wei.com>,
"piaojun@...wei.com" <piaojun@...wei.com>,
"amir73il@...il.com" <amir73il@...il.com>,
"ashish.samant@...cle.com" <ashish.samant@...cle.com>,
"yuehaibing@...wei.com" <yuehaibing@...wei.com>,
"lchen@...e.com" <lchen@...e.com>,
"jiang.biao2@....com.cn" <jiang.biao2@....com.cn>,
"gustavo@...eddedor.com" <gustavo@...eddedor.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"keescook@...omium.org" <keescook@...omium.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"kamalesh@...ux.vnet.ibm.com" <kamalesh@...ux.vnet.ibm.com>
Subject: [PATCH 1/5] arch/arc: unwind.c: replace swap function with built-in one
Replace swap_eh_frame_hdr_table_entries with built-in one, because
swap_eh_frame_hdr_table_entries does a simple byte to byte swap.
Signed-off-by: Andrey Abramov <st5pub@...dex.ru>
---
arch/arc/kernel/unwind.c | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
index 271e9fafa479..7610fe84afea 100644
--- a/arch/arc/kernel/unwind.c
+++ b/arch/arc/kernel/unwind.c
@@ -248,20 +248,6 @@ static int cmp_eh_frame_hdr_table_entries(const void *p1, const void *p2)
return (e1->start > e2->start) - (e1->start < e2->start);
}
-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;
-}
-
static void init_unwind_hdr(struct unwind_table *table,
void *(*alloc) (unsigned long))
{
@@ -354,10 +340,8 @@ static void init_unwind_hdr(struct unwind_table *table,
}
WARN_ON(n != header->fde_count);
- sort(header->table,
- n,
- sizeof(*header->table),
- cmp_eh_frame_hdr_table_entries, swap_eh_frame_hdr_table_entries);
+ sort(header->table, n,
+ sizeof(*header->table), cmp_eh_frame_hdr_table_entries, NULL);
table->hdrsz = hdrSize;
smp_wmb();
--
2.21.0
Powered by blists - more mailing lists