diff mbox series

[net] dt-bindings: net: pse-pd: microchip,pd692x0: Fix missing "additionalProperties" constraints

Message ID 20240523171732.2836880-1-robh@kernel.org (mailing list archive)
State Accepted
Commit 0fe53c0ab018b3399b8d4be95f32fd017c9719e1
Delegated to: Netdev Maintainers
Headers show
Series [net] dt-bindings: net: pse-pd: microchip,pd692x0: Fix missing "additionalProperties" constraints | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 32 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-05-24--15-00 (tests: 1037)

Commit Message

Rob Herring (Arm) May 23, 2024, 5:17 p.m. UTC
The child nodes are missing "additionalProperties" constraints which
means any undocumented properties or child nodes are allowed. Add the
constraints, and fix the fallout of wrong manager node regex and
missing properties.

Fixes: 9c1de033afad ("dt-bindings: net: pse-pd: Add bindings for PD692x0 PSE controller")
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/net/pse-pd/microchip,pd692x0.yaml        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Kory Maincent May 24, 2024, 7:38 a.m. UTC | #1
On Thu, 23 May 2024 12:17:31 -0500
"Rob Herring (Arm)" <robh@kernel.org> wrote:

> The child nodes are missing "additionalProperties" constraints which
> means any undocumented properties or child nodes are allowed. Add the
> constraints, and fix the fallout of wrong manager node regex and
> missing properties.

Acked-by: Kory Maincent <kory.maincent@bootlin.com>

Thanks for these fixes!
Didn't know that "additionnalProperties" should be set on all child node, but
that makes sense.

Regards,
patchwork-bot+netdevbpf@kernel.org May 28, 2024, midnight UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 23 May 2024 12:17:31 -0500 you wrote:
> The child nodes are missing "additionalProperties" constraints which
> means any undocumented properties or child nodes are allowed. Add the
> constraints, and fix the fallout of wrong manager node regex and
> missing properties.
> 
> Fixes: 9c1de033afad ("dt-bindings: net: pse-pd: Add bindings for PD692x0 PSE controller")
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net] dt-bindings: net: pse-pd: microchip,pd692x0: Fix missing "additionalProperties" constraints
    https://git.kernel.org/netdev/net/c/0fe53c0ab018

You are awesome, thank you!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/pse-pd/microchip,pd692x0.yaml b/Documentation/devicetree/bindings/net/pse-pd/microchip,pd692x0.yaml
index 828439398fdf..fd4244fceced 100644
--- a/Documentation/devicetree/bindings/net/pse-pd/microchip,pd692x0.yaml
+++ b/Documentation/devicetree/bindings/net/pse-pd/microchip,pd692x0.yaml
@@ -24,6 +24,7 @@  properties:
 
   managers:
     type: object
+    additionalProperties: false
     description:
       List of the PD69208T4/PD69204T4/PD69208M PSE managers. Each manager
       have 4 or 8 physical ports according to the chip version. No need to
@@ -47,8 +48,9 @@  properties:
       - "#size-cells"
 
     patternProperties:
-      "^manager@0[0-9a-b]$":
+      "^manager@[0-9a-b]$":
         type: object
+        additionalProperties: false
         description:
           PD69208T4/PD69204T4/PD69208M PSE manager exposing 4 or 8 physical
           ports.
@@ -69,9 +71,14 @@  properties:
         patternProperties:
           '^port@[0-7]$':
             type: object
+            additionalProperties: false
+
+            properties:
+              reg:
+                maxItems: 1
+
             required:
               - reg
-            additionalProperties: false
 
         required:
           - reg