2024-01-16 06:27:48

by André Draszik

[permalink] [raw]
Subject: [PATCH] dt-bindings: don't anchor DT_SCHEMA_FILES to bindings directory

From: André Draszik <[email protected]>

Commit 5e3ef4546819 ("dt-bindings: ignore paths outside kernel for
DT_SCHEMA_FILES") anchored all searches to the bindings directory
(since bindings only exist below that), but it turns out this is not
always desired.

Just anchor to the base kernel source directory and while at it, break
the overly long line for legibility.

Reported-by: Michal Simek <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Cc: Masahiro Yamada <[email protected]>
Signed-off-by: André Draszik <[email protected]>
---
Documentation/devicetree/bindings/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
index 2323fd5b7cda..129cf698fa8a 100644
--- a/Documentation/devicetree/bindings/Makefile
+++ b/Documentation/devicetree/bindings/Makefile
@@ -28,7 +28,10 @@ $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \
-name 'processed-schema*' \)

-find_cmd = $(find_all_cmd) | sed 's|^$(srctree)/$(src)/||' | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | sed 's|^|$(srctree)/$(src)/|'
+find_cmd = $(find_all_cmd) | \
+ sed 's|^$(srctree)/||' | \
+ grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
+ sed 's|^|$(srctree)/|'
CHK_DT_DOCS := $(shell $(find_cmd))

quiet_cmd_yamllint = LINT $(src)
--
2.43.0



2024-01-16 07:41:46

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: don't anchor DT_SCHEMA_FILES to bindings directory



On 1/16/24 07:27, André Draszik wrote:
> From: André Draszik <[email protected]>
>
> Commit 5e3ef4546819 ("dt-bindings: ignore paths outside kernel for
> DT_SCHEMA_FILES") anchored all searches to the bindings directory
> (since bindings only exist below that), but it turns out this is not
> always desired.
>
> Just anchor to the base kernel source directory and while at it, break
> the overly long line for legibility.
>
> Reported-by: Michal Simek <[email protected]>
> Closes: https://lore.kernel.org/all/[email protected]/
> Cc: Masahiro Yamada <[email protected]>
> Signed-off-by: André Draszik <[email protected]>
> ---
> Documentation/devicetree/bindings/Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
> index 2323fd5b7cda..129cf698fa8a 100644
> --- a/Documentation/devicetree/bindings/Makefile
> +++ b/Documentation/devicetree/bindings/Makefile
> @@ -28,7 +28,10 @@ $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
> find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \
> -name 'processed-schema*' \)
>
> -find_cmd = $(find_all_cmd) | sed 's|^$(srctree)/$(src)/||' | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | sed 's|^|$(srctree)/$(src)/|'
> +find_cmd = $(find_all_cmd) | \
> + sed 's|^$(srctree)/||' | \
> + grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
> + sed 's|^|$(srctree)/|'
> CHK_DT_DOCS := $(shell $(find_cmd))
>
> quiet_cmd_yamllint = LINT $(src)


Tested-by: Michal Simek <[email protected]>

Thanks,
Michal

2024-01-16 19:31:07

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: don't anchor DT_SCHEMA_FILES to bindings directory


On Tue, 16 Jan 2024 06:27:31 +0000, Andr? Draszik wrote:
> From: Andr? Draszik <[email protected]>
>
> Commit 5e3ef4546819 ("dt-bindings: ignore paths outside kernel for
> DT_SCHEMA_FILES") anchored all searches to the bindings directory
> (since bindings only exist below that), but it turns out this is not
> always desired.
>
> Just anchor to the base kernel source directory and while at it, break
> the overly long line for legibility.
>
> Reported-by: Michal Simek <[email protected]>
> Closes: https://lore.kernel.org/all/[email protected]/
> Cc: Masahiro Yamada <[email protected]>
> Signed-off-by: Andr? Draszik <[email protected]>
> ---
> Documentation/devicetree/bindings/Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>

Added a 'Fixes' tag and applied, thanks!