diff mbox series

nvmem: fixed-cell: Simplify nested if/then schema

Message ID 20240125134645.2549051-1-robh@kernel.org
State Not Applicable
Headers show
Series nvmem: fixed-cell: Simplify nested if/then schema | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 30 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Rob Herring (Arm) Jan. 25, 2024, 1:46 p.m. UTC
There's no reason to have a nested if/then schema as checking for compatible
being present and containing 'mac-base' can all be done in one 'if' schema.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../bindings/nvmem/layouts/fixed-cell.yaml    | 22 +++++++++----------
 1 file changed, 10 insertions(+), 12 deletions(-)

Comments

Srinivas Kandagatla Jan. 27, 2024, 11:27 a.m. UTC | #1
On Thu, 25 Jan 2024 07:46:44 -0600, Rob Herring wrote:
> There's no reason to have a nested if/then schema as checking for compatible
> being present and containing 'mac-base' can all be done in one 'if' schema.
> 
> 

Applied, thanks!

[1/1] nvmem: fixed-cell: Simplify nested if/then schema
      commit: 290ea1d6f990c92d5ae599554d8acafdd0ddeb2e

Best regards,
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml b/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
index ac2381e66027..8b3826243ddd 100644
--- a/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
+++ b/Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml
@@ -36,20 +36,18 @@  properties:
 
 allOf:
   - if:
+      properties:
+        compatible:
+          contains:
+            const: mac-base
       required: [ compatible ]
     then:
-      if:
-        properties:
-          compatible:
-            contains:
-              const: mac-base
-      then:
-        properties:
-          "#nvmem-cell-cells":
-            description: The first argument is a MAC address offset.
-            const: 1
-        required:
-          - "#nvmem-cell-cells"
+      properties:
+        "#nvmem-cell-cells":
+          description: The first argument is a MAC address offset.
+          const: 1
+      required:
+        - "#nvmem-cell-cells"
 
 required:
   - reg