From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2 02/20] xen: Introduce a function to split a Linux page into Xen page Date: Thu, 16 Jul 2015 17:13:31 +0100 Message-ID: <55A7D82B.5090106@citrix.com> References: <1436474552-31789-1-git-send-email-julien.grall@citrix.com> <1436474552-31789-3-git-send-email-julien.grall@citrix.com> <55A7C5A1.7060006@citrix.com> <55A7CB84.5070205@citrix.com> <55A7D739.2020605@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZFlmz-00012x-4C for xen-devel@lists.xenproject.org; Thu, 16 Jul 2015 16:13:37 +0000 In-Reply-To: <55A7D739.2020605@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall , Stefano Stabellini Cc: xen-devel@lists.xenproject.org, Boris Ostrovsky , ian.campbell@citrix.com, David Vrabel List-Id: xen-devel@lists.xenproject.org On 16/07/15 17:09, Julien Grall wrote: > Hi Andrew, > > On 16/07/2015 16:19, Andrew Cooper wrote: >>> Hmmm... right. I'm not sure why the compiler didn't catch it. >> >> Because there is not a path where it can possibly be used >> uninitialised. The for() loop is guaranteed to execute at least once. > > Oh right, the ret = 0 asked by Stefano confused me. In this case, I > don't see the point to initialize ret to 0 as it will never happen to > have the Linux page granularity inferior to the Xen page granularity. I agree. I would certainly not initialise ret if that was my code. ~Andrew