Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aWS9a-0006ih-HR for mharc-grub-devel@gnu.org; Thu, 18 Feb 2016 12:14:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWS9X-0006f7-GD for grub-devel@gnu.org; Thu, 18 Feb 2016 12:14:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWS9U-000358-B2 for grub-devel@gnu.org; Thu, 18 Feb 2016 12:14:07 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:36476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWS9U-00034x-3S for grub-devel@gnu.org; Thu, 18 Feb 2016 12:14:04 -0500 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1IHDvlI019238 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Feb 2016 17:13:58 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u1IHDv6N012444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 18 Feb 2016 17:13:57 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u1IHDp9Q022375; Thu, 18 Feb 2016 17:13:56 GMT Received: from olila.local.net-space.pl (/10.175.243.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 18 Feb 2016 09:13:45 -0800 Date: Thu, 18 Feb 2016 18:13:41 +0100 From: Daniel Kiper To: Juergen Gross Subject: Re: [PATCH v3 02/10] xen: reduce number of global variables in xen loader Message-ID: <20160218171341.GH3482@olila.local.net-space.pl> References: <1455729577-23702-1-git-send-email-jgross@suse.com> <1455729577-23702-3-git-send-email-jgross@suse.com> <20160218102210.GX3482@olila.local.net-space.pl> <56C59E49.8060201@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56C59E49.8060201@suse.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 Cc: grub-devel@gnu.org, phcoder@gmail.com, mchang@suse.com, xen-devel@lists.xen.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2016 17:14:09 -0000 On Thu, Feb 18, 2016 at 11:34:49AM +0100, Juergen Gross wrote: > On 18/02/16 11:22, Daniel Kiper wrote: > > On Wed, Feb 17, 2016 at 06:19:29PM +0100, Juergen Gross wrote: > >> The loader for xen paravirtualized environment is using lots of global > >> variables. Reduce the number by making them either local or by putting > >> them into a single state structure. > >> > >> Signed-off-by: Juergen Gross > > > > Just two nitpicks but in general... > > > > Reviewed-by: Daniel Kiper > > > >> --- > >> grub-core/loader/i386/xen.c | 259 +++++++++++++++++++++++--------------------- > >> 1 file changed, 138 insertions(+), 121 deletions(-) [...] > >> - if (!xen_module_info_page) > >> + if (!xen_state.module_info_page) > >> { > >> - n_modules = 0; > >> - max_addr = ALIGN_UP (max_addr, PAGE_SIZE); > >> - modules_target_start = max_addr; > >> - next_start.mod_start = max_addr + xen_inf.virt_base; > >> - next_start.flags |= SIF_MULTIBOOT_MOD; > >> + xen_state.n_modules = 0; > >> + xen_state.max_addr = ALIGN_UP (xen_state.max_addr, PAGE_SIZE); > >> + xen_state.modules_target_start = xen_state.max_addr; > >> + xen_state.next_start.mod_start = > >> + xen_state.max_addr + xen_state.xen_inf.virt_base; > > > > Lost one space. > > Really? Common indentation style seams to be to use tabs where possible. > And this is a tab. Sorry, I have missed that. Daniel