From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH] Implements new features for updating existing device tree nodes. Date: Sat, 16 Oct 2010 17:47:44 +1100 Message-ID: <20101016064744.GD5036@yookeroo> References: <20101016010732.4855.52273.stgit@riker> <1287199277.4535.1423.camel@riker> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1287199277.4535.1423.camel@riker> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: John Bonesio Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: devicetree@vger.kernel.org On Fri, Oct 15, 2010 at 08:21:17PM -0700, John Bonesio wrote: > On Fri, 2010-10-15 at 20:35 -0600, Grant Likely wrote: [snip] > > > + | devicetree DT_REMOVENODE DT_REF ';' > > > + { > > > + struct node *target; > > > + > > > + target = get_node_by_label($1, $3); > > > + if (target) > > > + remove_nodes(target); > > > + else > > > + yyerror("label, '%s' does not exist in" > > > + " node removal", $3); > > > ; > > > > This handles the syntax at the top level, but doesn't deal with the > > /*-node/ keywords when they are within the overlay tree. > > > > Also, I don't know if you'll be able to handle it in the same way when > > it comes to handling the new tokens embedded within an overlay tree > > because it isn't so easy to resolve the node to be removed. In order > > to handle both cases in the same way, it might be better to set a > > 'replace' flag in struct node that defers the actual remove of the > > original node until merge_nodes() time. > > Ok, so maybe I misunderstood. I thought we had decided that node > modifications would only happen at the top level, but now that I'm > looking back through your examples earlier today, and I see this isn't > true. Um.. that part of the discussion got confusing. I think only allowing the operations (and I still don't think the set implemented here are quite right, though they're close) at the top-level is a better idea. Grant, is there a reason you think we need to have replacement as an option within each tree, rather than a "per-overlay-sheet" option. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson