diff mbox series

[1/5] kbuild: fix DT binding schema rule to detect command line changes

Message ID 20200222190435.11767-1-masahiroy@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/5] kbuild: fix DT binding schema rule to detect command line changes | expand

Commit Message

Masahiro Yamada Feb. 22, 2020, 7:04 p.m. UTC
This if_change_rule is not working; it cannot detect any command line
changes.

The reason is because cmd-check in scripts/Kbuild.include compares
$(cmd_$@) and $(cmd_$1), but cmd_dtc_dt_yaml does not exist here.

For if_change_rule to work properly, the stem part of cmd_* and rule_*
must match. Because this cmd_and_fixdep invokes cmd_dtc, this rule must
be named rule_dtc.

Fixes: 4f0e3a57d6eb ("kbuild: Add support for DT binding schema checks")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/Makefile.lib | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Rob Herring Feb. 24, 2020, 10:52 p.m. UTC | #1
On Sun, Feb 23, 2020 at 04:04:31AM +0900, Masahiro Yamada wrote:
> This if_change_rule is not working; it cannot detect any command line
> changes.
> 
> The reason is because cmd-check in scripts/Kbuild.include compares
> $(cmd_$@) and $(cmd_$1), but cmd_dtc_dt_yaml does not exist here.
> 
> For if_change_rule to work properly, the stem part of cmd_* and rule_*
> must match. Because this cmd_and_fixdep invokes cmd_dtc, this rule must
> be named rule_dtc.
> 
> Fixes: 4f0e3a57d6eb ("kbuild: Add support for DT binding schema checks")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  scripts/Makefile.lib | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

For the series,

Acked-by: Rob Herring <robh@kernel.org>

I'm assuming you will take these? If not, I can in the DT tree.

Rob
Masahiro Yamada Feb. 25, 2020, 4:32 a.m. UTC | #2
Hi Rob,

On Tue, Feb 25, 2020 at 7:52 AM Rob Herring <robh@kernel.org> wrote:
>
> On Sun, Feb 23, 2020 at 04:04:31AM +0900, Masahiro Yamada wrote:
> > This if_change_rule is not working; it cannot detect any command line
> > changes.
> >
> > The reason is because cmd-check in scripts/Kbuild.include compares
> > $(cmd_$@) and $(cmd_$1), but cmd_dtc_dt_yaml does not exist here.
> >
> > For if_change_rule to work properly, the stem part of cmd_* and rule_*
> > must match. Because this cmd_and_fixdep invokes cmd_dtc, this rule must
> > be named rule_dtc.
> >
> > Fixes: 4f0e3a57d6eb ("kbuild: Add support for DT binding schema checks")
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  scripts/Makefile.lib | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
>
> For the series,
>
> Acked-by: Rob Herring <robh@kernel.org>
>
> I'm assuming you will take these? If not, I can in the DT tree.

Yes, I will queue these to kbuild tree.
Masahiro Yamada Feb. 26, 2020, 5:47 p.m. UTC | #3
On Tue, Feb 25, 2020 at 1:32 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Hi Rob,
>
> On Tue, Feb 25, 2020 at 7:52 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Sun, Feb 23, 2020 at 04:04:31AM +0900, Masahiro Yamada wrote:
> > > This if_change_rule is not working; it cannot detect any command line
> > > changes.
> > >
> > > The reason is because cmd-check in scripts/Kbuild.include compares
> > > $(cmd_$@) and $(cmd_$1), but cmd_dtc_dt_yaml does not exist here.
> > >
> > > For if_change_rule to work properly, the stem part of cmd_* and rule_*
> > > must match. Because this cmd_and_fixdep invokes cmd_dtc, this rule must
> > > be named rule_dtc.
> > >
> > > Fixes: 4f0e3a57d6eb ("kbuild: Add support for DT binding schema checks")
> > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > > ---
> > >
> > >  scripts/Makefile.lib | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > For the series,
> >
> > Acked-by: Rob Herring <robh@kernel.org>
> >
> > I'm assuming you will take these? If not, I can in the DT tree.
>
> Yes, I will queue these to kbuild tree.
>
>


Applied with Rob's Ack.
diff mbox series

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index bae62549e3d2..64b938c10039 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -302,13 +302,13 @@  DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.yaml
 quiet_cmd_dtb_check =	CHECK   $@
       cmd_dtb_check =	$(DT_CHECKER) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ ;
 
-define rule_dtc_dt_yaml
+define rule_dtc
 	$(call cmd_and_fixdep,dtc,yaml)
 	$(call cmd,dtb_check)
 endef
 
 $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
-	$(call if_changed_rule,dtc_dt_yaml)
+	$(call if_changed_rule,dtc)
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)