From patchwork Wed Jan 25 18:54:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Liu X-Patchwork-Id: 13115952 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 75A3AC54EED for ; Wed, 25 Jan 2023 18:55:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235696AbjAYSy7 convert rfc822-to-8bit (ORCPT ); Wed, 25 Jan 2023 13:54:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjAYSy7 (ORCPT ); Wed, 25 Jan 2023 13:54:59 -0500 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C82E99EFA for ; Wed, 25 Jan 2023 10:54:58 -0800 (PST) Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30PIVFqF024292 for ; Wed, 25 Jan 2023 10:54:58 -0800 Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3nakryyhvf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 25 Jan 2023 10:54:58 -0800 Received: from twshared16996.15.frc2.facebook.com (2620:10d:c085:108::8) by mail.thefacebook.com (2620:10d:c085:11d::4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Wed, 25 Jan 2023 10:54:57 -0800 Received: by devbig932.frc1.facebook.com (Postfix, from userid 4523) id 65B4C1469A25A; Wed, 25 Jan 2023 10:54:48 -0800 (PST) From: Song Liu To: , , CC: , Song Liu , Josh Poimboeuf , Petr Mladek Subject: [PATCH v11 1/2] x86/module: remove unused code in __apply_relocate_add Date: Wed, 25 Jan 2023 10:54:00 -0800 Message-ID: <20230125185401.279042-1-song@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-GUID: mpuVUFQ3iqYtZnp0lb2JezBkeLpPAKNf X-Proofpoint-ORIG-GUID: mpuVUFQ3iqYtZnp0lb2JezBkeLpPAKNf 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-25_12,2023-01-25_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 Acked-by: Josh Poimboeuf Reviewed-by: Joe Lawrence --- 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)