From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 072C7C43381 for ; Sun, 31 Mar 2019 03:33:12 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78BDC2173C for ; Sun, 31 Mar 2019 03:33:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b="XQbJE7yQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78BDC2173C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yandex.ru Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44X1Jj1sZQzDqDZ for ; Sun, 31 Mar 2019 14:33:09 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=yandex.ru (client-ip=2a02:6b8:0:1a2d::611; helo=forward501o.mail.yandex.net; envelope-from=st5pub@yandex.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=yandex.ru header.i=@yandex.ru header.b="XQbJE7yQ"; dkim-atps=neutral X-Greylist: delayed 448 seconds by postgrey-1.36 at bilbo; Sun, 31 Mar 2019 03:48:12 AEDT Received: from forward501o.mail.yandex.net (forward501o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::611]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44Wl0X0d1tzDqM3 for ; Sun, 31 Mar 2019 03:48:10 +1100 (AEDT) Received: from mxback21g.mail.yandex.net (mxback21g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:321]) by forward501o.mail.yandex.net (Yandex) with ESMTP id 1458A1E80077; Sat, 30 Mar 2019 19:40:32 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback21g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ppVQJ39iEk-eObCmM4j; Sat, 30 Mar 2019 19:40:31 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1553964031; bh=wUFI0A/Hfi2T5Xw16erqiqcqWUAYT1HNRh6fD4qBsQ0=; h=Message-Id:Cc:Subject:In-Reply-To:Date:References:To:From; b=XQbJE7yQ6mIuKw2yugAYZR4wXvmTRE+PODfLC6c8Gx/2w5sW5SVvbS5WFC7jygiey PvB7DrToo02sJhGmCMZKW4gTBCVJ+nZV6g/Z6kOFe/+WAciTXjjpfCtCNX+cTC/IAl Ds7vDi7SOO1L7UjXwrnzuz24o1XzlbE5kl1t48No= Authentication-Results: mxback21g.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by myt2-dc4bba9bb23c.qloud-c.yandex.net with HTTP; Sat, 30 Mar 2019 19:40:24 +0300 From: Andrey Abramov To: "vgupta@synopsys.com" , "benh@kernel.crashing.org" , "paulus@samba.org" , "mpe@ellerman.id.au" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "hpa@zytor.com" , "x86@kernel.org" , "mark@fasheh.com" , "jlbec@evilplan.org" , "richard@nod.at" , "dedekind1@gmail.com" , "adrian.hunter@intel.com" , "gregkh@linuxfoundation.org" , "naveen.n.rao@linux.vnet.ibm.com" , "jpoimboe@redhat.com" , Dave Chinner , "darrick.wong@oracle.com" , "ard.biesheuvel@linaro.org" , George Spelvin , "linux-snps-arc@lists.infradead.org" , Linux Kernel Mailing List , "linuxppc-dev@lists.ozlabs.org" , "ocfs2-devel@oss.oracle.com" , "linux-mtd@lists.infradead.org" , "sfr@canb.auug.org.au" In-Reply-To: <18626931553963861@sas1-b3ec53dbc12b.qloud-c.yandex.net> References: <18626931553963861@sas1-b3ec53dbc12b.qloud-c.yandex.net> Subject: [PATCH 1/5] arch/arc: unwind.c: replace swap function with built-in one MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 30 Mar 2019 19:40:24 +0300 Message-Id: <20170071553964024@myt2-dc4bba9bb23c.qloud-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailman-Approved-At: Sun, 31 Mar 2019 14:25:41 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mhocko@suse.com" , "gustavo@embeddedor.com" , "peterz@infradead.org" , "amir73il@gmail.com" , Rasmus Villemoes , "kamalesh@linux.vnet.ibm.com" , "piaojun@huawei.com" , "yamada.masahiro@socionext.com" , "jiang.biao2@zte.com.cn" , "jslaby@suse.cz" , "yuehaibing@huawei.com" , "rppt@linux.ibm.com" , "ge.changwei@h3c.com" , "keescook@chromium.org" , "jannh@google.com" , "ashish.samant@oracle.com" , "npiggin@gmail.com" , "jiangyiwen@huawei.com" , Andy Shevchenko , "lchen@suse.com" , "malat@debian.org" , Morton Andrew Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- 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