Received: by 10.223.176.5 with SMTP id f5csp2157855wra; Sun, 4 Feb 2018 22:15:34 -0800 (PST) X-Google-Smtp-Source: AH8x2263LhheYiib/ITIKEXSUfgrFDOvN686EyTw7hOoet6sZW1HD3JyYI3gl7AmNgBWajzaSz/c X-Received: by 10.99.191.15 with SMTP id v15mr6287681pgf.216.1517811333902; Sun, 04 Feb 2018 22:15:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517811333; cv=none; d=google.com; s=arc-20160816; b=JyV8xsnCqkdQRYM9g+JMglhh0tJEyNvYLTxHylllEhZMdrwzmScYLVRE1jaULBi3dj UcfSZv3Sy317i249nHnmPq7lLSMu4lKIAK+YzXzoR/V3KYynGNeN1k8lcEDU8B8eY6eF BpEKpbtz+1GiIvXp7APkQkXV+OWpJGx6IU8sgc5z7QRmzn8ey7X2dYAZIzWHT8H+Uenf WO/Yqfc5ACWB0E9CR7/2xSsT3rFQa9NHXF9aAc0HVh2N8en/87o+UepfIMH8fRanlGcy WGkfpMiNJEEf+bEWApD4Fpukp8rm0+3Ixw59vCf64gkxx9TUuVRWeP4TNELupNNW3WVY rxTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=YERtP02Ui+pjTkN/a/KrFP+P+eXamZL4MP7pQI+ncAU=; b=gGYmG1cgiFq6/jkEdI8Bp/Z9mwN1wyc/sWlxOjTTflD3qUsv4L+h9HZ3eakq/EtDfj rLP85NNKi5nybw6EWNdk57rHdRkvMXrVy2NiqE4b2Vk7RAS5AxIjMJrl6yaarTwkyqSv 6otsdlhgUTmzPKtetP7qa7W2d/ruNe1LwNiSp/sDG0ZzG/MI0w/l8D3yblVQ3joj9Hj9 TgWzvuexTjPtxRhux8dp45xZN8ByWEdtz1OvnfGE8qoG7qX+My+Ggk6ms82YODSOsWog fbKCcKetCG/uAznOZxXOJ8s7woycC1CDst9ZJVGE9BgvC43OUpIFX0bT7OD9cofeq/oS iOEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9-v6si545586plk.94.2018.02.04.22.15.19; Sun, 04 Feb 2018 22:15:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752759AbeBEGH5 (ORCPT + 99 others); Mon, 5 Feb 2018 01:07:57 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:33321 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750861AbeBEGH2 (ORCPT ); Mon, 5 Feb 2018 01:07:28 -0500 Received: by mail-pl0-f68.google.com with SMTP id t4so11115298plo.0; Sun, 04 Feb 2018 22:07:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YERtP02Ui+pjTkN/a/KrFP+P+eXamZL4MP7pQI+ncAU=; b=Juhqxr/U0mvp1x7BS0TkPtRcFwiZ+YNJfTTNblVAhRMCC9lGAcUlHmcocD8tGyvCq/ /HiXasO8zS7Br9vZX0u+d8L7YXwignAADMJ1uotYJCLv+K5p1sIxgJb5Fm6wOqIzccU7 gRYdd0FO/+IxNcbQrlcI3V5U3rQ171GEiT4iOVuIq96seC3tZOjuZNhBUMCb71NTKake IcYL/OHBQWpebSpUXYOAfkEvEWWlPtAKU3XoHbRHznTz8Z+495uA2Bp7cEZKo6NLIKCS rBXBO6h/tJVi8U0yH08XJ5aIPIoNeN8b1B55ecbb/LrPzH0NKMe1Man4mWa3jsrWhpY9 mFZQ== X-Gm-Message-State: AKwxytfGYc1xsCVhNyy4RKoQ1AVmeA1Qk6DPe5en2afN/461GVs6QjNf mQPlI6qfYZaiadyRLogtsQ== X-Received: by 2002:a17:902:6b48:: with SMTP id g8-v6mr33970808plt.151.1517810847610; Sun, 04 Feb 2018 22:07:27 -0800 (PST) Received: from localhost ([50.225.178.238]) by smtp.gmail.com with ESMTPSA id f72sm16810119pff.145.2018.02.04.22.07.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Feb 2018 22:07:26 -0800 (PST) Date: Mon, 5 Feb 2018 00:07:26 -0600 From: Rob Herring To: Frank Rowand Cc: Pantelis Antoniou , Pantelis Antoniou , devicetree@vger.kernel.org, Linux Kernel Mailing List , Geert Uytterhoeven Subject: Re: [PATCH 1/2] of: change overlay apply input data from EDT to FDT Message-ID: <20180205060726.s5kvcvzlxat42wa2@rob-hp-laptop> References: <1517194414-19932-1-git-send-email-frowand.list@gmail.com> <1517194414-19932-2-git-send-email-frowand.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 29, 2018 at 04:01:38PM -0800, Frank Rowand wrote: > On 01/29/18 06:42, Rob Herring wrote: > > On Sun, Jan 28, 2018 at 8:53 PM, wrote: > >> From: Frank Rowand > >> > >> Move duplicating and unflattening of an overlay flattened devicetree > >> (FDT) into the overlay application code. To accomplish this, > >> of_overlay_apply() is replaced by of_overlay_fdt_apply(). > >> > >> The copy of the FDT (aka "duplicate FDT") now belongs to devicetree > >> code, which is thus responsible for freeing the duplicate FDT. The > >> caller of of_overlay_fdt_apply() remains responsible for freeing the > >> original FDT. > >> > >> The unflattened device tree (aka expanded device tree, EDT) now > > > > Not really a fan of a new acronym. > > > >> belongs to devicetree code, which is thus responsible for freeing > >> the EDT. > >> > >> These ownership changes prevent early freeing of the duplicated FDT > >> or the EDT, which could result in use after free errors. > >> > >> of_overlay_fdt_apply() is a private function for the anticipated > >> overlay loader. > >> > >> Update unittest.c to use of_overlay_fdt_apply() instead of > >> of_overlay_apply(). > >> > >> Move overlay fragments from artificial locations in > >> drivers/of/unittest-data/tests-overlay.dtsi into one devicetree > >> source file per overlay. This led to changes in > >> drivers/of/unitest-data/Makefile and drivers/of/unitest.c. > > I should have reversed the cause and effect in that sentence to > instead be: > > The changes to drivers/of/unittest.c require the test overlays > to be in FDT form instead of unflattened devicetree form. Move > overlay fragments from artificial locations in > drivers/of/unittest-data/tests-overlay.dtsi into one > devicetree source file per overlay and thus create > one FDT per overlay. > > > > Why the rearranging? That should be a separate patch. > Bisectability. > > I can make the changes to the devicetree files in a second patch. > After the first patch, there will be 29 self test fails. > > I will make the change unless you respond back to this saying not to. One patch is fine for me. Unit test is special. Rob