From patchwork Sat Jan 21 00:49:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Liu X-Patchwork-Id: 46743 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp508196wrn; Fri, 20 Jan 2023 16:58:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXsVdoyQHivqBoFMFqeX3GKeVDZFnLbQdJIONjQTLaeoGrJWSOTdbMyL4uSZC6pMZY9zYoni X-Received: by 2002:a05:6a20:b914:b0:b8:537a:5525 with SMTP id fe20-20020a056a20b91400b000b8537a5525mr17691475pzb.51.1674262707136; Fri, 20 Jan 2023 16:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674262707; cv=none; d=google.com; s=arc-20160816; b=PKmms3XgUzdMQzSD4Oj8ngKTzjv7+sD9ebM0ec/Y4BiQU9kjeQyYTD+eYndKdRDTI7 azj6wcnMBujV0QfWadqtBfxYMILerHsPRraXJv3rrju2WuPLrMyHG27yet6Wns1UseWE 4iay4OLB01DAF4u63R1RNARcK5wSKVOrbaIHesYHXEQFyZbHDUfbRyJMlR45INxJDArP 1GDfMJn3Aj+hiG1bTXAoGefFKmmHhex9oTxG2wFRACFGbMONk/p5CXABDR5KrLOi/IHW 9MBgktghWpNnR/Pi46zMBE5VaN52KeeZajLWOnvrOmk8sk3cfonygd8iVle6OdKEr4x/ FaAw== 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; bh=pqtIJerBPFs5n4E+M6dm7TBlecLuzJ5v5CiPryTAL4Q=; b=MLy4HpSrHWJS77VsAvSh+CN/Et8mKC627zeIN33fQEogFmqYc7HGNi+akIYCBT8zsO naGBp1VWPeNwwOO7/hL7aMuuKlvfgiiBhAkjaFidkXNuCq+vHbe6h5HpbrJgXe66KuSE xiCWa+ur+RTuxt8VC+d9wgRK4Hwurqlomefo7RiV2sBo/+wQJvVK1y/3hIcIquMoavKk zpnkyxvBx+NCo+VCvQkJBoYSNzIT+N6C8fRtjQ3CKbfCQWoXroR7/KbO22iX9f6iOLAc J5DN6bUr7vCrmnHsahODqh877QWS3KrCRE5yyCFy5J/F2SqPfjjG78Vb0tTWH29z/RvH eENg== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b004b1c804cb0esi37378073pgq.74.2023.01.20.16.58.13; Fri, 20 Jan 2023 16:58:27 -0800 (PST) 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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229711AbjAUAuG convert rfc822-to-8bit (ORCPT + 99 others); Fri, 20 Jan 2023 19:50:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbjAUAuE (ORCPT ); Fri, 20 Jan 2023 19:50:04 -0500 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41E103C0C for ; Fri, 20 Jan 2023 16:50:04 -0800 (PST) Received: from pps.filterd (m0109333.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30KNmguV012402 for ; Fri, 20 Jan 2023 16:50:04 -0800 Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3n702vmdxh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 20 Jan 2023 16:50:03 -0800 Received: from twshared26225.38.frc1.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 20 Jan 2023 16:50:01 -0800 Received: by devbig932.frc1.facebook.com (Postfix, from userid 4523) id B7E0E1406D007; Fri, 20 Jan 2023 16:49:53 -0800 (PST) From: Song Liu To: , , CC: , Song Liu , Josh Poimboeuf Subject: [PATCH v10 1/2] x86/module: remove unused code in __apply_relocate_add Date: Fri, 20 Jan 2023 16:49:44 -0800 Message-ID: <20230121004945.697003-1-song@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-GUID: WwN7o-b_ESO1FMadZLp8rJ_lnuKYGn3w X-Proofpoint-ORIG-GUID: WwN7o-b_ESO1FMadZLp8rJ_lnuKYGn3w X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-20_13,2023-01-20_01,2022-06-22_01 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755591691999796154?= X-GMAIL-MSGID: =?utf-8?q?1755591691999796154?= This "#if 0" block has been untouched for many years. Remove it to clean up the code. Suggested-by: Josh Poimboeuf Signed-off-by: Song Liu Reviewed-by: Petr Mladek --- arch/x86/kernel/module.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index 705fb2a41d7d..1dee3ad82da2 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c @@ -188,10 +188,6 @@ static int __apply_relocate_add(Elf64_Shdr *sechdrs, goto invalid_relocation; val -= (u64)loc; write(loc, &val, 4); -#if 0 - if ((s64)val != *(s32 *)loc) - goto overflow; -#endif break; case R_X86_64_PC64: if (*(u64 *)loc != 0)