From: sashiko-bot@kernel.org
To: "Lorenzo Bianconi" <lorenzo@kernel.org>
Cc: devicetree@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org
Subject: Re: [PATCH net-next v5 01/12] dt-bindings: net: airoha: Add EN7581 ethernet-ports properties
Date: Sun, 10 May 2026 14:05:01 +0000 [thread overview]
Message-ID: <20260510140501.AF190C2BCC9@smtp.kernel.org> (raw)
In-Reply-To: <20260509-airoha-eth-multi-serdes-v5-1-805e38edc2aa@kernel.org>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The `reg` property check in the conditional `if` block uses an invalid JSON schema sequence that will always evaluate to false, causing valid device trees to fail validation.
- [High] The `ethernet-port@[0-5]` nodes model a `net_device` but strictly forbid standard network configuration properties like `mac-address` and `phy-handle`.
- [Low] Missing `#address-cells` and `#size-cells` in the `required` list for conditional child nodes.
--
commit 270a641148bef0e32520efd84b62bf6b97aa5a63
Author: Lorenzo Bianconi <lorenzo@kernel.org>
dt-bindings: net: airoha: Add EN7581 ethernet-ports properties
This commit introduces the ethernet-port property for EN7581 and AN7583
SoCs to model multiple net_devices connected via an external arbiter to
GDM3 or GDM4 ports.
> diff --git a/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml b/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
> --- a/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
> +++ b/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
[ ... ]
> @@ -130,6 +130,38 @@ patternProperties:
> maximum: 4
> description: GMAC port identifier
>
> + '#address-cells':
> + const: 1
> + '#size-cells':
> + const: 0
> +
> + allOf:
> + - if:
> + properties:
> + reg:
> + items:
> + - enum:
> + - 3
> + - 4
Will this schema condition evaluate as expected?
In dt-schema, reg properties are parsed into a matrix format, which is an
array of arrays of integers like [[3]]. This schema checks if the first
element of the outer array matches the scalar values 3 or 4, but since
the first element is an inner array, it won't match a scalar.
Could this cause the if block to always evaluate to false, causing valid
ethernet-port nodes to be incorrectly rejected because the parent node
sets unevaluatedProperties: false?
> + then:
Since #address-cells and #size-cells are needed for the ethernet@[3-4]
variants to act as buses for the new ethernet-port children, should they
be included in a required list within this conditional block?
Without them, an incomplete device tree could omit these properties and
silently pass schema validation.
> + patternProperties:
> + "^ethernet-port@[0-5]$":
> + type: object
> + unevaluatedProperties: false
Does setting unevaluatedProperties: false here without referencing
ethernet-controller.yaml# forbid standard network properties?
Since this models a net_device, driver code often expects to parse standard
properties like mac-address or phy-handle. Device tree authors might not
be able to configure them without triggering schema validation errors.
> + description: External ethernet port ID available on the GDM port
> +
> + properties:
> + compatible:
> + const: airoha,eth-port
> +
> + reg:
> + maxItems: 1
> + description: External ethernet port identifier
> +
> + required:
> + - compatible
> + - reg
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260509-airoha-eth-multi-serdes-v5-0-805e38edc2aa@kernel.org?part=1
next prev parent reply other threads:[~2026-05-10 14:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-09 13:05 [PATCH net-next v5 00/12] net: airoha: Support multiple net_devices connected to the same GDM port Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 01/12] dt-bindings: net: airoha: Add EN7581 ethernet-ports properties Lorenzo Bianconi
2026-05-10 14:05 ` sashiko-bot [this message]
2026-05-11 10:44 ` Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 02/12] net: airoha: Reserve RX headroom to avoid skb reallocation Lorenzo Bianconi
2026-05-10 14:05 ` sashiko-bot
2026-05-11 8:13 ` Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 03/12] net: airoha: Introduce airoha_gdm_dev struct Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 04/12] net: airoha: Move airoha_qdma pointer in " Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 05/12] net: airoha: Rely on airoha_gdm_dev pointer in airhoa_is_lan_gdm_port() Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 06/12] net: airoha: Move qos_sq_bmap in airoha_gdm_dev struct Lorenzo Bianconi
2026-05-10 14:05 ` sashiko-bot
2026-05-11 8:47 ` Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 07/12] net: airoha: Move {cpu,fwd}_tx_packets " Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 08/12] net: airoha: Support multiple net_devices for a single FE GDM port Lorenzo Bianconi
2026-05-10 14:05 ` sashiko-bot
2026-05-11 7:54 ` Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 09/12] net: airoha: Do not stop GDM port if it is shared Lorenzo Bianconi
2026-05-10 14:05 ` sashiko-bot
2026-05-11 7:47 ` Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 10/12] net: airoha: Introduce WAN device flag Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 11/12] net: airoha: Support multiple LAN/WAN interfaces for hw MAC address configuration Lorenzo Bianconi
2026-05-10 14:05 ` sashiko-bot
2026-05-11 7:02 ` Lorenzo Bianconi
2026-05-09 13:05 ` [PATCH net-next v5 12/12] net: airoha: Better handle MIB for GDM with multiple port attached Lorenzo Bianconi
2026-05-10 14:05 ` sashiko-bot
2026-05-11 6:51 ` Lorenzo Bianconi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260510140501.AF190C2BCC9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lorenzo@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.