public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvmem: fixed-cell: Simplify nested if/then schema
@ 2024-01-25 13:46 Rob Herring
  2024-01-27 11:27 ` Srinivas Kandagatla
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2024-01-25 13:46 UTC (permalink / raw)
  To: Srinivas Kandagatla, Krzysztof Kozlowski, Conor Dooley,
	Rafał Miłecki
  Cc: devicetree, linux-kernel

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

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
-- 
2.43.0


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

* Re: [PATCH] nvmem: fixed-cell: Simplify nested if/then schema
  2024-01-25 13:46 [PATCH] nvmem: fixed-cell: Simplify nested if/then schema Rob Herring
@ 2024-01-27 11:27 ` Srinivas Kandagatla
  0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Kandagatla @ 2024-01-27 11:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Conor Dooley, Rafał Miłecki,
	Rob Herring
  Cc: devicetree, linux-kernel


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,
-- 
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>


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

end of thread, other threads:[~2024-01-27 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-25 13:46 [PATCH] nvmem: fixed-cell: Simplify nested if/then schema Rob Herring
2024-01-27 11:27 ` Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox