From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3 4/5] dtc: Drop dts source restriction for yaml output
Date: Mon, 11 Oct 2021 16:15:54 +1100 [thread overview]
Message-ID: <YWPIiqpb3KlwTVN/@yekko> (raw)
In-Reply-To: <20210727183023.3212077-5-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
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-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-10-11 5:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 18:30 [PATCH v3 0/5] Improve output type formatting Rob Herring
[not found] ` <20210727183023.3212077-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-07-27 18:30 ` [PATCH v3 1/5] Move marker functions to dtc.h Rob Herring
[not found] ` <20210727183023.3212077-2-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-08-26 4:00 ` David Gibson
2021-09-27 20:56 ` Rob Herring
[not found] ` <CAL_Jsq+QAnyu=Fj_RtRu-dS4Ta0bZJWFUABsK1uKbnAKpXi1mA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-10-11 5:29 ` David Gibson
2021-07-27 18:30 ` [PATCH v3 2/5] Add has_type_markers() helper Rob Herring
2021-07-27 18:30 ` [PATCH v3 3/5] checks: Add markers on known properties Rob Herring
[not found] ` <20210727183023.3212077-4-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-10-11 5:09 ` David Gibson
2021-10-11 13:57 ` Rob Herring
2021-07-27 18:30 ` [PATCH v3 4/5] dtc: Drop dts source restriction for yaml output Rob Herring
[not found] ` <20210727183023.3212077-5-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-10-11 5:15 ` David Gibson [this message]
2021-10-11 13:22 ` Rob Herring
[not found] ` <CAL_Jsq+sMrRWqqPgcvoaiY0rLSp_s+gXOqJ9OuFLQ-3piUHSVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-10-13 3:12 ` David Gibson
2021-10-14 1:29 ` Rob Herring
[not found] ` <CAL_Jsq+iv7eM+LZ1O8d3V18dHraEAyfgdT8ucFKKVXZc9jEp4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-11-03 4:42 ` David Gibson
2021-11-03 15:59 ` Rob Herring
[not found] ` <CAL_JsqLNyfe8Ou4RXeLm0ie1vvJ+z15J6EDgB96dPbCC5qvHVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-11-03 19:16 ` Rob Herring
[not found] ` <CAL_JsqKeNne0Bf0ahG_h977snsBtsk3hbQOPO-6RiyFSyiOsfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-11-03 19:56 ` Simon Glass
[not found] ` <CAPnjgZ3BNPW+L4BrhQ9W4nLovSgcchWPfbznYxtf20sv2ntYaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-11-03 22:42 ` Rob Herring
[not found] ` <CAL_JsqLdKsVO9kzkZcqL160COrpEp6GsR10AyPvmSG3B=grAXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-11-03 22:48 ` Simon Glass
2021-11-09 4:41 ` David Gibson
2021-07-27 18:30 ` [PATCH v3 5/5] treesource: Maintain phandle label/path on output Rob Herring
[not found] ` <20210727183023.3212077-6-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-10-11 5:21 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YWPIiqpb3KlwTVN/@yekko \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).