Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934397AbbGVOko (ORCPT ); Wed, 22 Jul 2015 10:40:44 -0400 Received: from g4t3425.houston.hp.com ([15.201.208.53]:49414 "EHLO g4t3425.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934306AbbGVOkn (ORCPT ); Wed, 22 Jul 2015 10:40:43 -0400 From: "Elliott, Robert (Server Storage)" To: Pan Xinhui , "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 Thread-Topic: [PATCH V4] x86/mm/pat: Do a small optimization and fix in reserve_memtype Thread-Index: AQHQxIKKYMu073Rt60O5ZoBz8CMIbZ3nja1g Date: Wed, 22 Jul 2015 14:38:28 +0000 Message-ID: <94D0CD8314A33A4D9D801C0FE68B40295AA03106@G9W0745.americas.hpqcorp.net> References: <55AF9A2C.6000703@intel.com> In-Reply-To: <55AF9A2C.6000703@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.210.48.26] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t6MEemdK013799 Content-Length: 992 Lines: 33 --- 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. ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?