[v3,1/2] dt-bindings: net: constrain number of 'reg' in ethernet ports

Message ID 20221102161512.53399-1-krzysztof.kozlowski@linaro.org
State New
Headers
Series [v3,1/2] dt-bindings: net: constrain number of 'reg' in ethernet ports |

Commit Message

Krzysztof Kozlowski Nov. 2, 2022, 4:15 p.m. UTC
  'reg' without any constraints allows multiple items which is not the
intention for Ethernet controller's port number.

Constrain the 'reg' on AX88178 and LAN95xx USB Ethernet Controllers.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>

---

Changes since v2:
1. Drop changes to switches.
2. Add Rb tag.

Changes since v1:
1. Drop change to non-accepted renesas,r8a779f0-ether-switch.
---
 Documentation/devicetree/bindings/net/asix,ax88178.yaml      | 4 +++-
 Documentation/devicetree/bindings/net/microchip,lan95xx.yaml | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
  

Comments

Rob Herring Nov. 4, 2022, 9:51 p.m. UTC | #1
On Wed, 02 Nov 2022 12:15:11 -0400, Krzysztof Kozlowski wrote:
> 'reg' without any constraints allows multiple items which is not the
> intention for Ethernet controller's port number.
> 
> Constrain the 'reg' on AX88178 and LAN95xx USB Ethernet Controllers.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
> 
> ---
> 
> Changes since v2:
> 1. Drop changes to switches.
> 2. Add Rb tag.
> 
> Changes since v1:
> 1. Drop change to non-accepted renesas,r8a779f0-ether-switch.
> ---
>  Documentation/devicetree/bindings/net/asix,ax88178.yaml      | 4 +++-
>  Documentation/devicetree/bindings/net/microchip,lan95xx.yaml | 4 +++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
  
Florian Fainelli Nov. 4, 2022, 10:39 p.m. UTC | #2
On 11/2/22 09:15, Krzysztof Kozlowski wrote:
> 'reg' without any constraints allows multiple items which is not the
> intention for Ethernet controller's port number.
> 
> Constrain the 'reg' on AX88178 and LAN95xx USB Ethernet Controllers.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
  
patchwork-bot+netdevbpf@kernel.org Nov. 7, 2022, 8:50 a.m. UTC | #3
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed,  2 Nov 2022 12:15:11 -0400 you wrote:
> 'reg' without any constraints allows multiple items which is not the
> intention for Ethernet controller's port number.
> 
> Constrain the 'reg' on AX88178 and LAN95xx USB Ethernet Controllers.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
> 
> [...]

Here is the summary with links:
  - [v3,1/2] dt-bindings: net: constrain number of 'reg' in ethernet ports
    https://git.kernel.org/netdev/net-next/c/bd881b44fdbc
  - [v3,2/2] dt-bindings: net: dsa-port: constrain number of 'reg' in ports
    https://git.kernel.org/netdev/net-next/c/a352a2c5d2a5

You are awesome, thank you!
  

Patch

diff --git a/Documentation/devicetree/bindings/net/asix,ax88178.yaml b/Documentation/devicetree/bindings/net/asix,ax88178.yaml
index 1af52358de4c..a81dbc4792f6 100644
--- a/Documentation/devicetree/bindings/net/asix,ax88178.yaml
+++ b/Documentation/devicetree/bindings/net/asix,ax88178.yaml
@@ -27,7 +27,9 @@  properties:
           - usbb95,772b   # ASIX AX88772B
           - usbb95,7e2b   # ASIX AX88772B
 
-  reg: true
+  reg:
+    maxItems: 1
+
   local-mac-address: true
   mac-address: true
 
diff --git a/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml b/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
index cf91fecd8909..3715c5f8f0e0 100644
--- a/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
+++ b/Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
@@ -39,7 +39,9 @@  properties:
           - usb424,9e08   # SMSC LAN89530 USB Ethernet Device
           - usb424,ec00   # SMSC9512/9514 USB Hub & Ethernet Device
 
-  reg: true
+  reg:
+    maxItems: 1
+
   local-mac-address: true
   mac-address: true