All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Artem Shimko" <a.shimko.dev@gmail.com>,
	devicetree@vger.kernel.org, linux-leds@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH net-next 1/3] dt-bindings: net: dptel,dap8211r: add led nodes
Date: Sat, 14 Nov 2026 11:06:04 +0000	[thread overview]
Message-ID: <sashiko-outbox-214381@kernel.org> (raw)
In-Reply-To: <20261113110546.173624-2-a.shimko.dev@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dt-bindings: net: dptel,dap8211r: invalid and ineffective
  leds node schema
--

commit b253b1562298deb66ca7a0d9739c668ef65e6592
Author: Artem Shimko <a.shimko.dev@gmail.com>

dt-bindings: net: dptel,dap8211r: add led nodes

This commit documents the optional leds node and adds an example for the
DAP8211R PHY binding.

> diff --git a/Documentation/devicetree/bindings/net/dptel,dap8211r.yaml b/Documentation/devicetree/bindings/net/dptel,dap8211r.yaml
> index 4cd0f9730d954..43425fc8e96e0 100644
> --- a/Documentation/devicetree/bindings/net/dptel,dap8211r.yaml
> +++ b/Documentation/devicetree/bindings/net/dptel,dap8211r.yaml

[ ... ]

> @@ -28,6 +29,22 @@ properties:
>    compatible:
>      const: ethernet-phy-id0008.011b
>  
> +  leds:
> +    type: object
> +    description:
> +      Optional node describing the three configurable LEDs of the PHY.
> +      Each LED can be assigned a color, function and default trigger
> +      (e.g. "netdev" for link/activity indication).
> +    patternProperties:
> +      '^led@[0-2]$':
> +        type: object
> +        properties:
> +          reg:
> +            maxItems: 1
> +        required:
> +          - reg
> +        additionalProperties: true

[Severity: Medium]
Does this leds schema pass dt_binding_check or enforce the 0..2 LED index
limit?

The leds object omits additionalProperties: false (as well as
#address-cells and #size-cells), and ^led@[0-2]$ sets
additionalProperties: true without a compatible property, both of which
fail DT meta-schema validation.

Because ethernet-phy.yaml# is included in allOf and already defines leds
with ^led@[a-f0-9]+$, leaving additionalProperties unset on leds allows
child nodes outside ^led@[0-2]$ (such as led@3) to pass validation via
ethernet-phy.yaml#, while reg under ^led@[0-2]$ only specifies maxItems: 1
without restricting the value to 0..2.

Either drop the leds property block to inherit the definition from
ethernet-phy.yaml#, or define #address-cells, #size-cells, and
additionalProperties: false on leds and reference
/schemas/leds/common.yaml# with unevaluatedProperties: false and
maximum: 2 on reg under ^led@[0-2]$.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261113110546.173624-1-a.shimko.dev@gmail.com?part=1

  parent reply	other threads:[~2026-11-14 11:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 11:05 [PATCH net-next 0/3] net: phy: dap8211r: add LED hardware control Artem Shimko
2026-11-13 11:05 ` [PATCH net-next 1/3] dt-bindings: net: dptel,dap8211r: add led nodes Artem Shimko
2026-11-13 17:17   ` Conor Dooley
2026-11-14 11:06   ` sashiko-bot [this message]
2026-11-13 11:05 ` [PATCH net-next 2/3] net: phy: dap8211r: add extended register write helper Artem Shimko
2026-11-13 20:28   ` Andrew Lunn
2026-11-14 11:06   ` sashiko-bot
2026-11-13 11:05 ` [PATCH net-next 3/3] net: phy: dap8211r: add led hardware control support Artem Shimko
2026-11-13 20:32   ` Andrew Lunn
2026-11-14 11:06   ` sashiko-bot

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=sashiko-outbox-214381@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=a.shimko.dev@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@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.