From: Tim Deegan Subject: Re: [PATCH 13/16] device-tree: get_val cannot cope with cells > 2, add a BUG Date: Thu, 6 Sep 2012 14:35:16 +0100 Message-ID: <20120906133516.GM56463@ocelot.phlegethon.org> References: <1346678886.32462.9.camel@zakaz.uk.xensource.com> <1346679056-8108-13-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1346679056-8108-13-git-send-email-ian.campbell@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: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 13:30 +0000 on 03 Sep (1346679053), Ian Campbell wrote: > Signed-off-by: Ian Campbell > --- > xen/common/device_tree.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c > index 226e3f3..60f3a03 100644 > --- a/xen/common/device_tree.c > +++ b/xen/common/device_tree.c > @@ -45,6 +45,8 @@ static void __init get_val(const u32 **cell, u32 cells, u64 *val) > { > *val = 0; > > + BUG_ON( cells > 2 ); > + > while ( cells-- ) > { > *val <<= 32; > @@ -139,7 +141,7 @@ int device_tree_for_each_node(const void *fdt, > */ > const char *device_tree_bootargs(const void *fdt) > { > - int node; > + int node; Unrelated change - maybe in a cset of its own, if that's not too ridiculous? Tim.