Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753401AbbGUILF (ORCPT ); Tue, 21 Jul 2015 04:11:05 -0400 Received: from www.linutronix.de ([62.245.132.108]:58971 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751431AbbGUIK6 (ORCPT ); Tue, 21 Jul 2015 04:10:58 -0400 Date: Tue, 21 Jul 2015 10:10:39 +0200 (CEST) From: Thomas Gleixner To: Pan Xinhui cc: "linux-kernel@vger.kernel.org" , mingo@redhat.com, hpa@zytor.com, x86@kernel.org, bp@suse.de, toshi.kani@hp.com, jgross@suse.com, mcgrof@suse.com, "mnipxh@163.com" , "yanmin_zhang@linux.intel.com" Subject: Re: [PATCH V2] x86/mm/pat: Do a small optimization and fix in reserve_memtype In-Reply-To: <55ADFC78.9070707@intel.com> Message-ID: References: <55ADFC78.9070707@intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 753 Lines: 23 On Tue, 21 Jul 2015, Pan Xinhui wrote: > diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c > index 188e3e0..f3c49fa 100644 > --- a/arch/x86/mm/pat.c > +++ b/arch/x86/mm/pat.c > @@ -538,22 +538,20 @@ int reserve_memtype(u64 start, u64 end, enum page_cache_mode req_type, > new->type = actual_type; > > spin_lock(&memtype_lock); > - > err = rbt_memtype_check_insert(new, new_type); > + actual_type = new->type; What's the point of this? new->type is set to actual_type 5 lines above. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/