Re: [PATCH v3 4/5] dtc: Drop dts source restriction for yaml output

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



On Tue, Jul 27, 2021 at 12:30:22PM -0600, Rob Herring wrote:
> YAML output was restricted to dts input as there are some dependencies
> on source annotations which get lost with other input formats. With the
> addition of markers by the checks, YAML output from dtb format becomes
> more useful.
> 
> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>

Urgh.  There's not really anything wrong with this patch of itself,
but it really underlines my feeling that the whole yaml output thing
is a bunch of hacks in pursuit of a bogus goal.

Yaml output wants to include information that simply isn't present in
the flattened tree format (without considering bindings), so it relies
on formatting conventions in the dts, hence this test in the first
place.  This alleges it removes a restriction, but it only works if a
bunch of extra heuristics are able to guess the types correctly.

> ---
> v3:
>  - no change
> ---
>  dtc.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/dtc.c b/dtc.c
> index bc786c543b7e..acfeac1da234 100644
> --- a/dtc.c
> +++ b/dtc.c
> @@ -353,8 +353,6 @@ int main(int argc, char *argv[])
>  		dt_to_source(outf, dti);
>  #ifndef NO_YAML
>  	} else if (streq(outform, "yaml")) {
> -		if (!streq(inform, "dts"))
> -			die("YAML output format requires dts input format\n");
>  		dt_to_yaml(outf, dti);
>  #endif
>  	} else if (streq(outform, "dtb")) {

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