Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp37438rwb; Fri, 16 Sep 2022 23:59:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6MmUe80v9A7iwux9Kw1tLHh5u6fG76HxWtYVsl84c6KoKRF5DL4KhOAhiHkp36Bc0vX+bh X-Received: by 2002:a05:6402:11d1:b0:451:964:3af3 with SMTP id j17-20020a05640211d100b0045109643af3mr7010392edw.225.1663397949302; Fri, 16 Sep 2022 23:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663397949; cv=none; d=google.com; s=arc-20160816; b=g+TBNqEXzSD33SI0ELlk6u+sHtnvsgLriLLflhBTfXJ7RtpJTusH6M6iAdQrw6I0PE E0Gp6BZFTbNk6pTPXQosIfSE4Q0P/eSaC3UyZ13WCHy64Q5omu0ZkCccGcfZv5PuZpxH SKHrTbCm+tJs71LBImaZ73/u+0reXMtuwDBj+psutjHXGCWiuaJIZNQ4tnjHf7i0IMJ9 XhaJnNPrDBpKdKDHvHi8ea6szb3X1SRUMfN61B6sNyCKbcYIgDeIc1FaooiV1GUBJj2j ltVFK0No0hdR44VLuCkSB1PiO/ku7M6x8bEQVQc6bacAMMX36KfaSQz91ayIlnxDDAFo Ba5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xv1x02tQyisnebJpxSQgf/+7jhZQcpLjvEsag0vrxQ8=; b=VC2H/P4UqL1sSd4m2G6etpSsIGL4Jx6RRTvRsi5ev2I9+FvCUhi09rI+32NQkA/55L ldyhwX05RtFpM0N1tzfLU4qn2jTlLBIXKdNzGPXSwip8kg8ItQd/ejfXQZki1JsVlR9v b4AhV9ORwxdc4liBksFCpkd7ovP0Bde9ak/Dk864wvA77uGlqM5jzOAAJyOH1ktnxBTp hngeOTjIBkupXqZBHgDg4Gky8K5EHMJGDBnBuCmw6CBsUKknyzSdNlUP6In8Kuz17dh7 ZpmJC0AEHO1hT+m6wXbR0Ur49u+cdphWS81igyYnabZlGQhfeXrXFyChYABKFYrUiinO P1xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="co/Z4MNS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc36-20020a1709071c2400b00779e71654e6si21895855ejc.56.2022.09.16.23.58.42; Fri, 16 Sep 2022 23:59:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="co/Z4MNS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229539AbiIQGyK (ORCPT + 99 others); Sat, 17 Sep 2022 02:54:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiIQGyF (ORCPT ); Sat, 17 Sep 2022 02:54:05 -0400 Received: from mail-m972.mail.163.com (mail-m972.mail.163.com [123.126.97.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 841F3558EA for ; Fri, 16 Sep 2022 23:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=xv1x0 2tQyisnebJpxSQgf/+7jhZQcpLjvEsag0vrxQ8=; b=co/Z4MNS25lHG9fhaF5Wf 3i9/qNISt2mCg7fV/xziApyB0VM+ot0qa6f0bpuwfZSi1lTpBlnba7LtrLB3L2rb DT+vnqm6W9pZe6OEavMSGbAV/nwMUnSv5CBzR/aWd4dO2lCkFMt5YRVkgWS0vjCL EMV951I0uZnAKnnzPfAGq4= Received: from DESKTOP-CE2KKHI.localdomain (unknown [124.160.210.227]) by smtp2 (Coremail) with SMTP id GtxpCgAHSfv8biVjfyE+eQ--.63538S2; Sat, 17 Sep 2022 14:53:49 +0800 (CST) From: williamsukatube@163.com To: chenhuacai@kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Cc: kernel@xen0n.name, William Dean Subject: [PATCH -next] LoongArch: simplify code in apply_r_larch_sop_push_dup Date: Sat, 17 Sep 2022 14:53:45 +0800 Message-Id: <20220917065345.2595-1-williamsukatube@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: GtxpCgAHSfv8biVjfyE+eQ--.63538S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GFWktFW7KF4DCF4kZr1UZFb_yoWDJFg_Zw 17AayrWr1DJa1UZw18Jw4rAw4xK3yvgFyFvF92qF47ZF1UGrs7uFs8W398Crn3tFW8Kr45 JrWvk34qkrsFqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRM3ktUUUUUU== X-Originating-IP: [124.160.210.227] X-CM-SenderInfo: xzlozx5dpv3yxdwxuvi6rwjhhfrp/xtbB6A5-g2BHKJKnZgAAsG X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: William Dean It could directly return 'rela_stack_push' to simplify code. Signed-off-by: William Dean --- arch/loongarch/kernel/module.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/loongarch/kernel/module.c b/arch/loongarch/kernel/module.c index 638427ff0d51..a8f90d51d9ae 100644 --- a/arch/loongarch/kernel/module.c +++ b/arch/loongarch/kernel/module.c @@ -99,13 +99,10 @@ static int apply_r_larch_sop_push_dup(struct module *mod, u32 *location, Elf_Add if (err) return err; err = rela_stack_push(opr1, rela_stack, rela_stack_top); - if (err) - return err; - err = rela_stack_push(opr1, rela_stack, rela_stack_top); if (err) return err; - return 0; + return rela_stack_push(opr1, rela_stack, rela_stack_top); } static int apply_r_larch_sop_push_plt_pcrel(struct module *mod, u32 *location, Elf_Addr v, -- 2.25.1