All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rob Herring <robh@kernel.org>
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Maxime Ripard <mripard@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>
Subject: Re: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks
Date: Tue, 16 Mar 2021 15:34:37 +0100	[thread overview]
Message-ID: <CAMuHMdXqnHq+zdpdr3y7NO-a_JCT-ogfTKDnLLOhFb-UWiGwrA@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqKPgB+Zz4VHd9dn27bdiZgE=_QUem8BR76Vfc6Y3G8GVw@mail.gmail.com>

Hi Rob,

On Tue, Mar 16, 2021 at 3:28 PM Rob Herring <robh@kernel.org> wrote:
> On Tue, Mar 16, 2021 at 7:55 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Fri, Mar 12, 2021 at 12:38 AM Rob Herring <robh@kernel.org> wrote:
> > > dt-validate has an option to warn on any compatible strings which don't
> > > match any schema. The option has recently been improved to fix false
> > > positives, so let's enable the option. This is useful for tracking
> > > compatibles which are undocumented or not yet converted to DT schema.
> > > Previously, the only check of undocumented compatible strings has been
> > > an imperfect checkpatch.pl check.
> > >
> > > The option is enabled by default for 'dtbs_check'. This will add more
> > > warnings, but some platforms are down to only a handful of these
> > > warnings (good job!).
> > >
> > > There's about 100 cases in the binding examples, so the option is
> > > disabled until these are fixed. In the meantime, they can be checked
> > > with:
> > >
> > > make DT_CHECKER_FLAGS=-m dt_binding_check
> > >
> > > Cc: Maxime Ripard <mripard@kernel.org>
> > > Cc: Masahiro Yamada <masahiroy@kernel.org>
> > > Cc: Michal Marek <michal.lkml@markovi.net>
> > > Cc: linux-kbuild@vger.kernel.org
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> >
> > Thanks for your patch!
> >
> > This causes lots of warning when using DT_SCHEMA_FILES, as all
> > compatible values in bindings not specified with DT_SCHEMA_FILES
> > become unknown.
> >
> > Perhaps this should be disabled automatically when DT_SCHEMA_FILES
> > is specified?
>
> Indeed. I'll fix it up like this:
>
> index 90b095c60f79..ad6938468c11 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -360,7 +360,7 @@ $(overlay-y): FORCE
>  $(call multi_depend, $(overlay-y), .dtb, -dtbs)
>
>  DT_CHECKER ?= dt-validate
> -DT_CHECKER_FLAGS ?= -m
> +DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),,-m)
>  DT_BINDING_DIR := Documentation/devicetree/bindings
>  # DT_TMP_SCHEMA may be overridden from
> Documentation/devicetree/bindings/Makefile
>  DT_TMP_SCHEMA ?= $(objtree)/$(DT_BINDING_DIR)/processed-schema.json

Thanks, works like a charm!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

      reply	other threads:[~2021-03-16 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 23:36 [PATCH 1/2] dt-bindings: Bump dtschema version required to v2021.2.1 Rob Herring
2021-03-11 23:36 ` [PATCH 2/2] kbuild: Enable DT undocumented compatible checks Rob Herring
2021-03-16 13:55   ` Geert Uytterhoeven
2021-03-16 14:28     ` Rob Herring
2021-03-16 14:34       ` Geert Uytterhoeven [this message]

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=CAMuHMdXqnHq+zdpdr3y7NO-a_JCT-ogfTKDnLLOhFb-UWiGwrA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --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=mripard@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.