From: Matthias Brugger Date: Wed, 4 Sep 2019 18:29:27 +0200 Subject: [U-Boot] [PATCH 2/2] libfdt: return correct value if #size-cells property is not present In-Reply-To: References: <20190726091339.24420-1-matthias.bgg@kernel.org> <20190726091339.24420-2-matthias.bgg@kernel.org> <228cf1dd-ced2-b8c6-6810-f6898f628606@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi all, On 13/08/2019 11:34, Simon Glass wrote: > +Stephen Warren > > Hi Matthias, > > On Thu, 1 Aug 2019 at 05:42, Matthias Brugger wrote: >> >> Hi all, >> >> On 26/07/2019 11:13, matthias.bgg at kernel.org wrote: >>> From: Matthias Brugger >>> >>> According to the device tree specification, the default value for >>> was not present. >>> >>> This patch also makes fdt_address_cells() and fdt_size_cells() conform >>> to the behaviour documented in libfdt.h. The defaults are only returned >>> if fdt_getprop() returns -FDT_ERR_NOTFOUND, otherwise the actual error >>> is returned. >>> >>> This is based on upstream commit: >>> aa7254d ("libfdt: return correct value if #size-cells property is not present") >>> but misses the test case part, as we don't implement them in u-boot. >>> >>> Signed-off-by: Matthias Brugger >> >> After running these two patches through the CI [1] I realized that three test >> are failing: >> test/py sandbox >> test/py sandbox with clang >> test/py sandbox_flattree >> >> All three fail dm_test_fdt_translation() in the case "No translation for busses >> with #size-cells == 0" [2]. >> >> Can anybody with more insight in the test infrastructure and the sandbox >> architecture help me to identify if this is >> a) a bug in the sandbox >> b) a bug in our test >> c) a bug in my patch >> >> I write this because I'm pretty sure that it is not option c), as we just stick >> to the specs here. > > Can you check the test and see? It might well be that the test is wrong. > > I hope we don't have tet code relying on this. > I think I found the error. I missed a commit in libftd which fixes the issue. I'll send a v2 soon. Thanks, Matthias