linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: Fix erroneous 'additionalProperties'
@ 2020-04-24 16:17 Rob Herring
  2020-04-24 16:19 ` Mark Brown
  2020-04-27  6:52 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2020-04-24 16:17 UTC (permalink / raw)
  To: devicetree
  Cc: linux-kernel, Iskren Chernev, Lee Jones, Saravanan Sekar,
	Liam Girdwood, Mark Brown

There's several cases of json-schema 'additionalProperties' at the wrong
indentation level which has the effect of making them DT properties. This
is harmless, but let's fix them so a meta-schema check for this can be
added.

In all the cases, either the 'additionalProperties' was extra or doesn't
work because there's a $ref to more properties. In the latter case, we
can use 'unevaluatedProperties' instead.

Reported-by: Iskren Chernev <iskren.chernev@gmail.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Saravanan Sekar <sravanhome@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/mfd/st,stpmic1.yaml       | 2 --
 Documentation/devicetree/bindings/regulator/mps,mp5416.yaml | 1 -
 .../devicetree/bindings/regulator/mps,mpq7920.yaml          | 3 ++-
 .../bindings/regulator/rohm,bd71828-regulator.yaml          | 6 +++++-
 .../bindings/regulator/rohm,bd71837-regulator.yaml          | 6 +++++-
 .../bindings/regulator/rohm,bd71847-regulator.yaml          | 6 +++++-
 6 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
index f88d13d70441..be7faa6dc055 100644
--- a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
+++ b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
@@ -259,8 +259,6 @@ properties:
 
     additionalProperties: false
 
-  additionalProperties: false
-
 additionalProperties: false
 
 required:
diff --git a/Documentation/devicetree/bindings/regulator/mps,mp5416.yaml b/Documentation/devicetree/bindings/regulator/mps,mp5416.yaml
index f0acce2029fd..3b019fa6db31 100644
--- a/Documentation/devicetree/bindings/regulator/mps,mp5416.yaml
+++ b/Documentation/devicetree/bindings/regulator/mps,mp5416.yaml
@@ -37,7 +37,6 @@ properties:
         type: object
 
     additionalProperties: false
-  additionalProperties: false
 
 required:
   - compatible
diff --git a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
index a682af0dc67e..ae6e7ab36c58 100644
--- a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
+++ b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
@@ -75,7 +75,8 @@ properties:
             description: |
               disables over voltage protection of this buck
 
-      additionalProperties: false
+        unevaluatedProperties: false
+
     additionalProperties: false
 
 required:
diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml
index 71ce032b8cf8..1e52dafcb5c9 100644
--- a/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml
@@ -35,6 +35,8 @@ patternProperties:
         description:
           should be "ldo1", ..., "ldo7"
 
+    unevaluatedProperties: false
+
   "^BUCK[1-7]$":
     type: object
     allOf:
@@ -103,5 +105,7 @@ patternProperties:
 
     required:
       - regulator-name
-  additionalProperties: false
+
+    unevaluatedProperties: false
+
 additionalProperties: false
diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml
index a323b1696eee..543d4b52397e 100644
--- a/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml
@@ -41,6 +41,8 @@ patternProperties:
         description:
           should be "ldo1", ..., "ldo7"
 
+    unevaluatedProperties: false
+
   "^BUCK[1-8]$":
     type: object
     allOf:
@@ -99,5 +101,7 @@ patternProperties:
 
     required:
       - regulator-name
-  additionalProperties: false
+
+    unevaluatedProperties: false
+
 additionalProperties: false
diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml
index 526fd00bcb16..d797cc23406f 100644
--- a/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml
@@ -40,6 +40,8 @@ patternProperties:
         description:
           should be "ldo1", ..., "ldo6"
 
+    unevaluatedProperties: false
+
   "^BUCK[1-6]$":
     type: object
     allOf:
@@ -93,5 +95,7 @@ patternProperties:
 
     required:
       - regulator-name
-  additionalProperties: false
+
+    unevaluatedProperties: false
+
 additionalProperties: false
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: Fix erroneous 'additionalProperties'
  2020-04-24 16:17 [PATCH] dt-bindings: Fix erroneous 'additionalProperties' Rob Herring
@ 2020-04-24 16:19 ` Mark Brown
  2020-04-27  6:52 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-04-24 16:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel, Iskren Chernev, Lee Jones,
	Saravanan Sekar, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

On Fri, Apr 24, 2020 at 11:17:07AM -0500, Rob Herring wrote:
> There's several cases of json-schema 'additionalProperties' at the wrong
> indentation level which has the effect of making them DT properties. This
> is harmless, but let's fix them so a meta-schema check for this can be
> added.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: Fix erroneous 'additionalProperties'
  2020-04-24 16:17 [PATCH] dt-bindings: Fix erroneous 'additionalProperties' Rob Herring
  2020-04-24 16:19 ` Mark Brown
@ 2020-04-27  6:52 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2020-04-27  6:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel, Iskren Chernev, Saravanan Sekar,
	Liam Girdwood, Mark Brown

On Fri, 24 Apr 2020, Rob Herring wrote:

> There's several cases of json-schema 'additionalProperties' at the wrong
> indentation level which has the effect of making them DT properties. This
> is harmless, but let's fix them so a meta-schema check for this can be
> added.
> 
> In all the cases, either the 'additionalProperties' was extra or doesn't
> work because there's a $ref to more properties. In the latter case, we
> can use 'unevaluatedProperties' instead.
> 
> Reported-by: Iskren Chernev <iskren.chernev@gmail.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Saravanan Sekar <sravanhome@gmail.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/mfd/st,stpmic1.yaml       | 2 --

Acked-by: Lee Jones <lee.jones@linaro.org>

>  Documentation/devicetree/bindings/regulator/mps,mp5416.yaml | 1 -
>  .../devicetree/bindings/regulator/mps,mpq7920.yaml          | 3 ++-
>  .../bindings/regulator/rohm,bd71828-regulator.yaml          | 6 +++++-
>  .../bindings/regulator/rohm,bd71837-regulator.yaml          | 6 +++++-
>  .../bindings/regulator/rohm,bd71847-regulator.yaml          | 6 +++++-
>  6 files changed, 17 insertions(+), 7 deletions(-)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-27  6:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 16:17 [PATCH] dt-bindings: Fix erroneous 'additionalProperties' Rob Herring
2020-04-24 16:19 ` Mark Brown
2020-04-27  6:52 ` Lee Jones

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).