diff mbox series

[net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems

Message ID 1727723615-2109795-1-git-send-email-radhey.shyam.pandey@amd.com (mailing list archive)
State Accepted
Commit c6929644c1e0d6108e57061d427eb966e1746351
Delegated to: Netdev Maintainers
Headers show
Series [net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems | 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: 9 this patch: 9
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 1 blamed authors not CCed: sarath.babu.naidu.gaddam@amd.com; 2 maintainers not CCed: radhey.shyam.pandey@xilinx.com sarath.babu.naidu.gaddam@amd.com
netdev/build_clang success Errors and warnings before: 9 this patch: 9
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 fail Errors and warnings before: 12 this patch: 12
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 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

Commit Message

Radhey Shyam Pandey Sept. 30, 2024, 7:13 p.m. UTC
From: Ravikanth Tuniki <ravikanth.tuniki@amd.com>

Add missing reg minItems as based on current binding document
only ethernet MAC IO space is a supported configuration.

There is a bug in schema, current examples contain 64-bit
addressing as well as 32-bit addressing. The schema validation
does pass incidentally considering one 64-bit reg address as
two 32-bit reg address entries. If we change axi_ethernet_eth1
example node reg addressing to 32-bit schema validation reports:

Documentation/devicetree/bindings/net/xlnx,axi-ethernet.example.dtb:
ethernet@40000000: reg: [[1073741824, 262144]] is too short

To fix it add missing reg minItems constraints and to make things clearer
stick to 32-bit addressing in examples.

Fixes: cbb1ca6d5f9a ("dt-bindings: net: xlnx,axi-ethernet: convert bindings document to yaml")
Signed-off-by: Ravikanth Tuniki <ravikanth.tuniki@amd.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
---
 Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


base-commit: d505d3593b52b6c43507f119572409087416ba28

Comments

Conor Dooley Oct. 1, 2024, 5:10 p.m. UTC | #1
On Tue, Oct 01, 2024 at 12:43:35AM +0530, Radhey Shyam Pandey wrote:
> From: Ravikanth Tuniki <ravikanth.tuniki@amd.com>
> 
> Add missing reg minItems as based on current binding document
> only ethernet MAC IO space is a supported configuration.
> 
> There is a bug in schema, current examples contain 64-bit
> addressing as well as 32-bit addressing. The schema validation
> does pass incidentally considering one 64-bit reg address as
> two 32-bit reg address entries. If we change axi_ethernet_eth1
> example node reg addressing to 32-bit schema validation reports:
> 
> Documentation/devicetree/bindings/net/xlnx,axi-ethernet.example.dtb:
> ethernet@40000000: reg: [[1073741824, 262144]] is too short
> 
> To fix it add missing reg minItems constraints and to make things clearer
> stick to 32-bit addressing in examples.
> 
> Fixes: cbb1ca6d5f9a ("dt-bindings: net: xlnx,axi-ethernet: convert bindings document to yaml")
> Signed-off-by: Ravikanth Tuniki <ravikanth.tuniki@amd.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>
patchwork-bot+netdevbpf@kernel.org Oct. 3, 2024, 10:20 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 1 Oct 2024 00:43:35 +0530 you wrote:
> From: Ravikanth Tuniki <ravikanth.tuniki@amd.com>
> 
> Add missing reg minItems as based on current binding document
> only ethernet MAC IO space is a supported configuration.
> 
> There is a bug in schema, current examples contain 64-bit
> addressing as well as 32-bit addressing. The schema validation
> does pass incidentally considering one 64-bit reg address as
> two 32-bit reg address entries. If we change axi_ethernet_eth1
> example node reg addressing to 32-bit schema validation reports:
> 
> [...]

Here is the summary with links:
  - [net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems
    https://git.kernel.org/netdev/net/c/c6929644c1e0

You are awesome, thank you!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
index bbe89ea9590c..e95c21628281 100644
--- a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
+++ b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
@@ -34,6 +34,7 @@  properties:
       and length of the AXI DMA controller IO space, unless
       axistream-connected is specified, in which case the reg
       attribute of the node referenced by it is used.
+    minItems: 1
     maxItems: 2
 
   interrupts:
@@ -181,7 +182,7 @@  examples:
         clock-names = "s_axi_lite_clk", "axis_clk", "ref_clk", "mgt_clk";
         clocks = <&axi_clk>, <&axi_clk>, <&pl_enet_ref_clk>, <&mgt_clk>;
         phy-mode = "mii";
-        reg = <0x00 0x40000000 0x00 0x40000>;
+        reg = <0x40000000 0x40000>;
         xlnx,rxcsum = <0x2>;
         xlnx,rxmem = <0x800>;
         xlnx,txcsum = <0x2>;