linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Rob Herring <robh@kernel.org>, DTML <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] kbuild: Always validate DT binding examples
Date: Tue, 21 Apr 2020 16:46:54 +0300	[thread overview]
Message-ID: <20200421134654.GD5983@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAK7LNAQtfyqfbQx2ivg=sVdhxDH9ShVBa+bL-4sC7MU1N=y+cw@mail.gmail.com>

Hi Yamada-san,

On Tue, Apr 21, 2020 at 10:15:02PM +0900, Masahiro Yamada wrote:
> On Tue, Apr 21, 2020 at 8:05 PM Laurent Pinchart wrote:
> > On Tue, Apr 21, 2020 at 07:45:05PM +0900, Masahiro Yamada wrote:
> > > On Tue, Apr 21, 2020 at 7:08 PM Laurent Pinchart wrote:
> > > > On Fri, Feb 28, 2020 at 06:37:30PM -0600, Rob Herring wrote:
> > > > > Most folks only run dt_binding_check on the single schema they care about
> > > > > by setting DT_SCHEMA_FILES. That means example is only checked against
> > > > > that one schema which is not always sufficient.
> > > > >
> > > > > Let's address this by splitting processed-schema.yaml into 2 files: one
> > > > > that's always all schemas for the examples and one that's just the schema
> > > > > in DT_SCHEMA_FILES for dtbs.
> > > >
> > > > This broke
> > > >
> > > > make DT_SCHEMA_FILES=Documentation/devicetree/.. dt_binding_check
> > >
> > > What is intended by
> > > "DT_SCHEMA_FILES=Documentation/devicetree/.."  ?
> >
> > My bad, I forgot to write that ... is the continuation of the string.
> > It's any yaml schema file that has an example.
> 
> Ah, OK. I just input verbatim.
> 
> Is it broken?
> 
> You can specify any individual file(s) under Documentation/devicetree/bindings/.
> 
> For example, the following worked for me.
> 
> $ make DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/psci.yaml
>  dt_binding_check
>   HOSTCC  scripts/basic/fixdep
>   HOSTCC  scripts/dtc/dtc.o
>   HOSTCC  scripts/dtc/flattree.o
>   HOSTCC  scripts/dtc/fstree.o
>   HOSTCC  scripts/dtc/data.o
>   HOSTCC  scripts/dtc/livetree.o
>   HOSTCC  scripts/dtc/treesource.o
>   HOSTCC  scripts/dtc/srcpos.o
>   HOSTCC  scripts/dtc/checks.o
>   HOSTCC  scripts/dtc/util.o
>   LEX     scripts/dtc/dtc-lexer.lex.c
>   YACC    scripts/dtc/dtc-parser.tab.[ch]
>   HOSTCC  scripts/dtc/dtc-lexer.lex.o
>   HOSTCC  scripts/dtc/dtc-parser.tab.o
>   HOSTCC  scripts/dtc/yamltree.o
>   HOSTLD  scripts/dtc/dtc
>   CHKDT   Documentation/devicetree/bindings/arm/psci.yaml
>   SCHEMA  Documentation/devicetree/bindings/processed-schema-examples.yaml
>   DTC     Documentation/devicetree/bindings/arm/psci.example.dt.yaml
>   CHECK   Documentation/devicetree/bindings/arm/psci.example.dt.yaml
>   SCHEMA  Documentation/devicetree/bindings/processed-schema.yaml

This is getting interesting.

~/src/kernel/linux $ make O=output/x86 DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/psci.yaml dt_binding_check
make[1]: Entering directory '/home/laurent/src/kernel/linux/output/x86'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  LEX     scripts/dtc/dtc-lexer.lex.c
  YACC    scripts/dtc/dtc-parser.tab.[ch]
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTCC  scripts/dtc/yamltree.o
  HOSTLD  scripts/dtc/dtc
  CHKDT   Documentation/devicetree/bindings/arm/psci.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema-examples.yaml
  DTC     Documentation/devicetree/bindings/arm/psci.example.dt.yaml
  CHECK   Documentation/devicetree/bindings/arm/psci.example.dt.yaml
  SCHEMA  Documentation/devicetree/bindings/processed-schema.yaml
make[1]: Leaving directory '/home/laurent/src/kernel/linux/output/x86'

~/src/kernel/this_is_a_long_directory_name/linux $ make O=output/x86 DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/psci.yaml dt_binding_check
make[1]: Entering directory '/home/laurent/src/kernel/this_is_a_long_directory_name/linux/output/x86'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  LEX     scripts/dtc/dtc-lexer.lex.c
  YACC    scripts/dtc/dtc-parser.tab.[ch]
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTCC  scripts/dtc/yamltree.o
  HOSTLD  scripts/dtc/dtc
  CHKDT   Documentation/devicetree/bindings/arm/psci.yaml
make[2]: execvp: /bin/sh: Argument list too long
make[2]: *** [/home/laurent/src/kernel/this_is_a_long_directory_name/linux/Documentation/devicetree/bindings/Makefile:38: Documentation/devicetree/bindings/processed-schema-examples.yaml] Error 127
make[1]: *** [/home/laurent/src/kernel/this_is_a_long_directory_name/linux/Makefile:1300: dt_binding_check] Error 2
make[1]: Leaving directory '/home/laurent/src/kernel/this_is_a_long_directory_name/linux/output/x86'
make: *** [Makefile:180: sub-make] Error 2

It seems to only fail with out of tree builds (O=...). I expect that
failures will become more common the more YAML bindings we have, even
without long directory names.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2020-04-21 13:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-29  0:37 [PATCH v2 1/2] kbuild: Always validate DT binding examples Rob Herring
2020-02-29  0:37 ` [PATCH v2 2/2] kbuild: Build DT binding examples with dtc warnings enabled Rob Herring
2020-02-29  4:25 ` [PATCH v2 1/2] kbuild: Always validate DT binding examples Masahiro Yamada
2020-03-02 16:06   ` Rob Herring
2020-03-03 13:45     ` Masahiro Yamada
2020-04-21 10:07 ` Laurent Pinchart
2020-04-21 10:45   ` Masahiro Yamada
2020-04-21 11:05     ` Laurent Pinchart
2020-04-21 13:15       ` Masahiro Yamada
2020-04-21 13:46         ` Laurent Pinchart [this message]
2020-04-21 14:01           ` Rob Herring
2020-04-21 16:56             ` Masahiro Yamada
2020-04-21 19:31               ` Rob Herring
2020-04-21 20:40                 ` Rob Herring
2020-04-21 18:29             ` Laurent Pinchart
2020-04-21 17:36           ` Masahiro Yamada
2020-04-21 13:47         ` Rob Herring
2020-04-21 17:31           ` Masahiro Yamada

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=20200421134654.GD5983@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=robh@kernel.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).