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 3B4ABC43334 for ; Mon, 11 Jul 2022 02:35:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229492AbiGKCfy (ORCPT ); Sun, 10 Jul 2022 22:35:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiGKCfy (ORCPT ); Sun, 10 Jul 2022 22:35:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C63ADF36; Sun, 10 Jul 2022 19:35:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2739261047; Mon, 11 Jul 2022 02:35:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32143C341C8; Mon, 11 Jul 2022 02:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657506952; bh=U5JfLaTDMJDWXhQ3M7TBmA+YrHYx+pIWdYRWiHn/62s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hl+so+OY8l+S8nfO4wI8BzRze5s1P2/8/PTp6XOeZqE9XLTP4AECUZXa2huTZ93WB KdXuF3v6WSDpbmNyb07syhNqQs5OholW21GjAYrpKACjyTFgMgxEICwOhpGqtKN/Y6 O1vI3six+4rbZDVkKe3vV2HntEQbmsoxYs4h5vIPBbr0Gz8bX/ay3DBupMUgOMeupN TozBVqmT5KXJTP1dKMKKhgA8og6Q5KE0glP1xolHo9Cj9EttyrkBzdkBc8KlTnaEd3 AdWX0aSZxXQOaMHM2tIGtlxLvotsLp4RaS474tXLjS7mI2EB536uFr6XFoOxX0Sz5D 54Y3xamP6+8sQ== Date: Mon, 11 Jul 2022 05:35:47 +0300 From: Jarkko Sakkinen To: Kristen Carlson Accardi Cc: linux-sgx@vger.kernel.org, Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Sean Christopherson Subject: Re: [PATCH] x86/sgx: Drop 'page_index' from sgx_backingf Message-ID: References: <20220708162124.8442-1-kristen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220708162124.8442-1-kristen@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Fri, Jul 08, 2022 at 09:21:24AM -0700, Kristen Carlson Accardi wrote: > From: Sean Christopherson > > Storing the 'page_index' value in the sgx_backing struct is > dead code and no longer needed. > > Signed-off-by: Sean Christopherson > Signed-off-by: Kristen Carlson Accardi > Cc: Sean Christopherson > --- > arch/x86/kernel/cpu/sgx/encl.c | 1 - > arch/x86/kernel/cpu/sgx/encl.h | 1 - > 2 files changed, 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c > index 19876ebfb504..fa93586a536c 100644 > --- a/arch/x86/kernel/cpu/sgx/encl.c > +++ b/arch/x86/kernel/cpu/sgx/encl.c > @@ -735,7 +735,6 @@ static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index, > return PTR_ERR(pcmd); > } > > - backing->page_index = page_index; > backing->contents = contents; > backing->pcmd = pcmd; > backing->pcmd_offset = page_pcmd_off & (PAGE_SIZE - 1); > diff --git a/arch/x86/kernel/cpu/sgx/encl.h b/arch/x86/kernel/cpu/sgx/encl.h > index 332ef3568267..eeb1a53ddf48 100644 > --- a/arch/x86/kernel/cpu/sgx/encl.h > +++ b/arch/x86/kernel/cpu/sgx/encl.h > @@ -78,7 +78,6 @@ struct sgx_va_page { > }; > > struct sgx_backing { > - pgoff_t page_index; > struct page *contents; > struct page *pcmd; > unsigned long pcmd_offset; > -- > 2.20.1 > Reviewed-by: Jarkko Sakkinen BR, Jarkko