Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754016AbbGWB6N (ORCPT ); Wed, 22 Jul 2015 21:58:13 -0400 Received: from mga03.intel.com ([134.134.136.65]:58348 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753500AbbGWB6L (ORCPT ); Wed, 22 Jul 2015 21:58:11 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,527,1432623600"; d="scan'208";a="752738011" Message-ID: <55B049A3.1020503@intel.com> Date: Thu, 23 Jul 2015 09:55:47 +0800 From: Pan Xinhui User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "Elliott, Robert (Server Storage)" , "linux-kernel@vger.kernel.org" CC: Thomas Gleixner , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "bp@suse.de" , "Kani, Toshimitsu" , "jgross@suse.com" , "mcgrof@suse.com" , "mnipxh@163.com" , "yanmin_zhang@linux.intel.com" , Borislav Petkov Subject: Re: [PATCH V4] x86/mm/pat: Do a small optimization and fix in reserve_memtype References: <55AF9A2C.6000703@intel.com> <94D0CD8314A33A4D9D801C0FE68B40295AA03106@G9W0745.americas.hpqcorp.net> In-Reply-To: <94D0CD8314A33A4D9D801C0FE68B40295AA03106@G9W0745.americas.hpqcorp.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1347 Lines: 45 hi, Elliot thanks for your reply. On 2015年07月22日 22:38, Elliott, Robert (Server Storage) wrote: > > > --- > Robert Elliott, HP Server Storage > >> -----Original Message----- >> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- >> owner@vger.kernel.org] On Behalf Of Pan Xinhui >> Sent: Wednesday, July 22, 2015 8:27 AM > ... >> diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c >> index 188e3e0..8fa1f07 100644 >> --- a/arch/x86/mm/pat.c >> +++ b/arch/x86/mm/pat.c >> @@ -521,10 +521,7 @@ int reserve_memtype(u64 start, u64 end, enum >> page_cache_mode req_type, >> >> is_range_ram = pat_pagerange_is_ram(start, end); >> if (is_range_ram == 1) { >> - >> - err = reserve_ram_pages_type(start, end, req_type, new_type); >> - >> - return err; >> + return reserve_ram_pages_type(start, end, req_type, new_type); >> } else if (is_range_ram < 0) { >> return -EINVAL; >> } > > With each branch now just one line, the {} can be removed. > thanks for the nice tips. sorry for my mistakes. thanks xinhui > > -- 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/