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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 938E8C54EAA for ; Fri, 27 Jan 2023 13:46:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231771AbjA0Nqd (ORCPT ); Fri, 27 Jan 2023 08:46:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231512AbjA0Nqb (ORCPT ); Fri, 27 Jan 2023 08:46:31 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1FFF3FF24 for ; Fri, 27 Jan 2023 05:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674827152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZL6syL4gm2H3QLJOVyJqOMOKMhyc7AUkpoBTr0bkmxU=; b=FWG2Ms1f9c5AjnQ2uS3SSt84nhP3sSMF3F6o/TKrjK2HqwFNRZ7DE3j7OytDynN8LqQgkb ZSppyLiLU0n3AN563oyCtv4b+Kw9+bn9Rtz3iJgouJ7hxwwxJ7x1jvGkDxxEfDrxbquepZ 1Qfqh0r7BGMHpESD5oT7ecYhwX2YIG4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-171-I19kgIIjOTS9LbaUZ_z72g-1; Fri, 27 Jan 2023 08:45:50 -0500 X-MC-Unique: I19kgIIjOTS9LbaUZ_z72g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F4C31818E52; Fri, 27 Jan 2023 13:45:49 +0000 (UTC) Received: from redhat.com (unknown [10.22.33.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FEB72166B29; Fri, 27 Jan 2023 13:45:49 +0000 (UTC) Date: Fri, 27 Jan 2023 08:45:47 -0500 From: Joe Lawrence To: Song Liu Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, live-patching@vger.kernel.org, x86@kernel.org, Josh Poimboeuf , Petr Mladek Subject: Re: [PATCH v11 1/2] x86/module: remove unused code in __apply_relocate_add Message-ID: References: <20230125185401.279042-1-song@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230125185401.279042-1-song@kernel.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 25, 2023 at 10:54:00AM -0800, Song Liu wrote: > 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) > -- > 2.30.2 > Reviewed-by: Joe Lawrence -- Joe