Re: [PATCH v4 09/11] doc: ti: k3: fix pygments warning parsing device-tree

Simon Glass <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <CAFLszTiwQMwOTdwNFTHrqgih+v+eMGCc3F1jt=wMd0AJCcn9VA__21679.3087938399$1786115575$gmane$org@mail.gmail.com>
Hi Bryan,

On Fri, 7 Aug 2026 at 07:04, Bryan Brattlof <[email protected]> wrote:
>
> On August  6, 2026 thus sayeth Simon Glass:
> > Hi Bryan,
> >
> > On 2026-08-04T21:55:02, Bryan Brattlof <[email protected]> wrote:
> > > doc: ti: k3: fix pygments warning parsing device-tree
> > >
> > > A warning is emitted when generating the FIT image examples because of
> > > white-space and invalid node names. Fix them
> >
> > Please mention what the fix actually is (converting the placeholder
> > brackets into valid DTS node syntax).
>
> Sure
>
> >
> > >
> > > Tested-by: Anshul Dalal <[email protected]>
> > > Reviewed-by: Anshul Dalal <[email protected]>
> > > Signed-off-by: Bryan Brattlof <[email protected]>
> > >
> > > doc/board/ti/k3.rst | 42 +++++++++++++++++++++++-------------------
> > >  1 file changed, 23 insertions(+), 19 deletions(-)
> >
> > > diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
> > > @@ -466,25 +466,29 @@ choose any configuration at runtime to boot from.
> > > +       configurations {
> > > +           default = <conf-1>
> > > +           conf-1 {
> >
> > This line is still not valid DTS - it is missing the trailing
> > semicolon, and for FIT the 'default' property is a string, so it
> > should be:
> >
> >     default = 'conf-1';
>
> Sure. My aim was to suppress the warnings emitted by the lexer. I don't
> think this snippet, even if completely syntactically correct, would
> produce anything meaningful other than being an illustration.
>
> >
> > > diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
> > > @@ -466,25 +466,29 @@ choose any configuration at runtime to boot from.
> > > +           conf-2 {
> > > +                image = "image-2";
> > > +                fdt = "fdt-1";
> > > +           };
> >
> > The two properties inside conf-2 are indented one extra space compared
> > with those in conf-1 above. Please make them consistent.
>
> Sure
>
> >
> > > diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
> > > @@ -466,25 +466,29 @@ choose any configuration at runtime to boot from.
> > > -    /dts-v1/;
> > > -
> > > -    / {
> >
> > Any reason to drop the /dts-v1/; header? The block is tagged '..
> > code-block:: dts' so keeping it makes the snippet a complete, valid
> > DTS fragment. While you are here, the surrounding examples use 4-space
> > indentation; changing this one to 3 spaces is a bit jarring.
> >
>
> The best I can tell the DT lexer in pygments doesn't support /dts-v1/;
>
>     https://github.com/pygments/pygments/blob/master/pygments/lexers/devicetree.py

Ah OK, that explains it, thanks.

Regards,
Simon

> ~Bryan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.