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: 13110787 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46DB5C27C76 for ; Sat, 21 Jan 2023 00:50:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbjAUAuF convert rfc822-to-8bit (ORCPT ); Fri, 20 Jan 2023 19:50:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjAUAuE (ORCPT ); Fri, 20 Jan 2023 19:50:04 -0500 Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF36BCC1C for ; Fri, 20 Jan 2023 16:50:02 -0800 (PST) Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.17.1.19/8.17.1.19) with ESMTP id 30KMufuq022851 for ; Fri, 20 Jan 2023 16:50:02 -0800 Received: from maileast.thefacebook.com ([163.114.130.16]) by m0089730.ppops.net (PPS) with ESMTPS id 3n6vyjwwbq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 20 Jan 2023 16:50:02 -0800 Received: from twshared26225.38.frc1.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::d) 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-ORIG-GUID: Pcvrt30ITOXtEvEKGcd3KcnM8U-vUnon X-Proofpoint-GUID: Pcvrt30ITOXtEvEKGcd3KcnM8U-vUnon 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 Precedence: bulk List-ID: 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)