From: "Jan Beulich" Subject: Re: [PATCH 3/6] xen/common: grant_table: Avoid to shadow "frame" in __gnttab_map_grant_ref Date: Tue, 27 Oct 2015 10:22:37 -0600 Message-ID: <562FB2DD02000078000AF430@prv-mh.provo.novell.com> References: <1445960359-17217-1-git-send-email-julien.grall@citrix.com> <1445960359-17217-4-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zr71H-0008KX-0T for xen-devel@lists.xenproject.org; Tue, 27 Oct 2015 16:22:43 +0000 In-Reply-To: <1445960359-17217-4-git-send-email-julien.grall@citrix.com> Content-Disposition: inline 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 Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 27.10.15 at 16:39, wrote: > The variable "frame" is declared twice within the function > __gntab_map_grant_ref. This makes the code quite confusing to read. > > The second definition is not useful as the first one is never used > until then. So drop it. That's not fully correct - the function scope variable has an intializer. What makes the change correct is the fact the this initializer is there for no reason. So a really complete patch would have deleted the initializer at once. Jan