Re: Warnings do include offending filename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Feb 01, 2017 at 07:34:06AM +0000, Ian Campbell wrote:
> On Wed, 2017-02-01 at 12:00 +1100, David Gibson wrote:
> > On Wed, Feb 01, 2017 at 11:16:54AM +1100, David Gibson wrote:
> > > On Tue, Jan 31, 2017 at 08:24:48AM +0000, Ian Campbell wrote:
> > > > On Tue, 2017-01-31 at 10:49 +1100, David Gibson wrote:
> > > > > On Mon, Jan 30, 2017 at 09:13:05AM +0000, Ian Campbell wrote:
> > > > > > Hello,
> > > > > > 
> > > > > > I wasn't sure how/where to make a wishlist bug report, so I hope this
> > > > > > will suffice, am happy to be pointed in a different direction though.
> > > > > > 
> > > > > > I recently[0] stumbled over around 1,000 of these:
> > > > > >     Warning (unit_address_vs_reg): Node /soc has a reg or ranges property, but no unit name
> > > > > >     Warning (unit_address_vs_reg): Node /soc/main-oscillator has a reg or ranges property, but no unit name
> > > > > >     Warning (unit_address_vs_reg): Node /soc has a reg or ranges property, but no unit name
> > > > > >     Warning (unit_address_vs_reg): Node /soc has a reg or ranges property, but no unit name
> > > > > >     Warning (unit_address_vs_reg): Node /soc/main-oscillator has a reg or ranges property, but no unit name
> > > > > >     Warning (unit_address_vs_reg): Node /soc has a reg or ranges property, but no unit name
> > > > > >     Warning (unit_address_vs_reg): Node /soc/main-oscillator has a reg or ranges property, but no unit name
> > > > > > 
> > > > > > When building the split device tree repo[1] from the Linux source
> > > > > > (essential it's a build of every single dts in the kernel source).
> > > > > > 
> > > > > > The cause of the warning is an issue which needs to be fixed but I
> > > > > > thought I would mention that it would be very useful (I expect) if dtc
> > > > > > would include the offending file in warnings (like e.g. gcc would), not
> > > > > > just because of the number of *.dtb being built here but also due to
> > > > > > #include and /include/ of .dtsi files.
> > > > > 
> > > > > Right, having the filenames - and line numbers - there would certainly
> > > > > be helpful.  Unfortunately, it's not at all trivial to implement.  As
> > > > > someone said in a different thread, these checks take place (and have
> > > > > to) after the tree is completely parsed and we no longer have source
> > > > > locations readily to hand.
> > > > 
> > > > Would it be easier (or possible) to print the name of the eventually-
> > > > to-be-output binary? At the moment the user is left guessing which one
> > > > of 1,200 *.dtb files they just built produced each of the similar
> > > > number of warnings. If the message was instead:
> > > > 
> > > >     Warning (unit_address_vs_reg): arch/arm/boot/dts/foo.dtb: Node /soc has a ...
> > > > 
> > > > Then that would at least be something to go on.
> > > > 
> > > > In fact, given the checks are on the final tree, naming the output file
> > > >  in the messages seems fairly logical (you could even imagine doing
> > > > these checks in a separate linter tool after the fact, given the *.dtb
> > > > as input, I suppose)
> > > 
> > > Hm, possible, though a bit messy to do within dtc.  The output file is
> > 
> > s/is/isn't/  duh.
> > 
> > > currently passed into that section of the code, but I guess we could
> > > add it.
> > > 
> > > However, it seems this would more easily be fixed from the Makefile
> > > side: if you echo a (suitably abbreviated) dtc command line, then it
> > > should become obvious which dtb the errors are associated with.
> 
> Not with "make -j12" sadly. I suppose people could rerun make without
> the -j to figure out where the warning came from, but it seems rather
> suboptimal to me.

Yeah, I guess.  Given it's possible though I'm disinclined to make a
change to dtc myself.  Feel free to send a patch and I'll think about
it.

-- 
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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux