From: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
Benoit Cousson <bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH 0/3] Extend dtc with data type handling
Date: Mon, 23 Dec 2013 20:00:54 +0100 [thread overview]
Message-ID: <2257946.KY9lGl9U4o@amdc1227> (raw)
In-Reply-To: <20131223120814.GE12407-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
On Monday 23 of December 2013 23:08:14 David Gibson wrote:
> On Fri, Dec 13, 2013 at 05:49:09PM +0100, Tomasz Figa wrote:
> > This series intends to extend dtc with appropriate infrastructure
> > to handle property data types. First, dtc is modified to preserve
> > type information when parsing DTS. Then type guessing is implemented
> > for flat and fs trees where type data is not available. After that,
> > DTS generation code is modified to use only type information when
> > printing property data.
>
> Hrm. I think this is completely backwards to the right approach.
>
> For dt checking what we want is a schema. That can specify datatypes
> amongst other constraints, but in the end you can check the actual
> bytes of the DT against the constraints imposed by the schema,
> regardless of how those bytes are presented to the checker.
Those constraints are usually types, so you need a way to extract them
from source DTS.
>
> By adding type information to the in-flight tree you're checking not
> the actual content of the DT, but how you've chosen to express that
> information in DTS format.
>
> More concretely, we should be able to schema-check trees in binary
> format, not just source. With these patches that will fail if -I dtb
> makes the wrong type guesses.
I'm not quite sure what do you want to check in binary format, where
properties are just strings of bytes. All you can check is whether there
is enough bytes or possibly some value constraints on particular parts
of it, but not types.
IMHO what we primarily need is source validation. Of course using schemas,
but that's already decided.
Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-12-23 19:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 16:49 [PATCH 0/3] Extend dtc with data type handling Tomasz Figa
[not found] ` < 1386953352-25402-2-git-send-email-t.figa@samsung.com>
[not found] ` <1386953352-25402-1-git-send-email-t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-13 16:49 ` [PATCH 1/3] dtc: Keep type information from DTS Tomasz Figa
[not found] ` <1386953352-25402-2-git-send-email-t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-16 18:08 ` Stephen Warren
[not found] ` <52AF41A1.3000508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-12-23 19:16 ` Tomasz Figa
2014-01-21 12:06 ` Grant Likely
[not found] ` <20140121120606.A2E7CC4054E-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2014-01-22 4:49 ` David Gibson
2013-12-13 16:49 ` [PATCH 2/3] dtc: Inject guessed type information in case of flat and fs trees Tomasz Figa
2013-12-13 16:49 ` [PATCH 3/3] dtc: Use type information when printing tree source Tomasz Figa
2013-12-23 12:08 ` [PATCH 0/3] Extend dtc with data type handling David Gibson
[not found] ` <20131223120814.GE12407-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2013-12-23 19:00 ` Tomasz Figa [this message]
2013-12-24 11:57 ` 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=2257946.KY9lGl9U4o@amdc1227 \
--to=t.figa-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
--cc=bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@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