Devicetree
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v2] dt-bindings: net: Convert HiSilicon hns-dsaf to DT schema
Date: Fri, 2 Oct 2026 11:50:36 -0500	[thread overview]
Message-ID: <20261002165036.GA2622685-robh@kernel.org> (raw)
In-Reply-To: <20261002091340.E8C1C1F0089A@smtp.kernel.org>

On Fri, Oct 02, 2026 at 09:13:40AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
> - [Medium] dt-bindings: additionalProperties false ignores properties from $ref
> - [Medium] dt-bindings: missing required properties desc-num, buf-size and subctrl-syscon
> - [Low] dt-bindings: driver still uses removed top-level phy-handle property
> --
> 
> commit d25b601aef3405df25a4432415cfd3e767a90222
> Author: Rob Herring (Arm) <robh@kernel.org>
> Subject: dt-bindings: net: Convert HiSilicon hns-dsaf to DT schema
> 
> This commit converts the HiSilicon hns-dsaf device tree binding from
> the old text format to the new YAML schema format. It drops the
> top-level phy-handle property and adds the media-type property.
> 
> > Convert the HiSilicon hns-dsaf binding to DT schema format.
> > 
> > Drop 'phy-handle' at top level as there are no users. Add undocumented
> > 'media-type' property.
> 
> [Severity: Low]
> Is it entirely accurate that there are no users of the top-level
> phy-handle property?

Yes, there are no .dts users. It is not even clear if these platforms 
are even being used. HiSilicon folks can add it back if they care.

> 
> Looking at hns_mac_init_phy_handle() in
> drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:
> 
>     np = of_parse_phandle(mac_cb->dev->of_node, "phy-handle",
>                           mac_cb->mac_id);
> 
> The driver still explicitly parses this property from the top-level DSAF
> node as a fallback if port subnodes are not present. Removing this from
> the schema without removing the fallback logic in the driver will cause
> out-of-tree or legacy device trees relying on this feature to needlessly
> fail schema validation.
> 
> Should it remain in the schema (possibly marked as deprecated) until the
> C driver is patched to drop support entirely?
> 
> [ ... ]
> > diff --git a/Documentation/devicetree/bindings/net/hisilicon,hns-dsaf-v1.yaml b/Documentation/devicetree/bindings/net/hisilicon,hns-dsaf-v1.yaml
> > new file mode 100644
> > index 0000000000000..36251b45abeb9
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/hisilicon,hns-dsaf-v1.yaml
> [ ... ]
> > +patternProperties:
> > +  "^port@[0-5]$":
> > +    description: DSA Fabric port node
> > +    $ref: ethernet-switch-port.yaml#
> > +    additionalProperties: false
> 
> [Severity: Medium]
> Does additionalProperties: false correctly allow properties inherited
> from the $ref?
> 
> Under JSON Schema semantics, additionalProperties only restricts the
> properties explicitly listed in the local object, completely ignoring
> any properties evaluated via a $ref.
> 
> Would it be better to use unevaluatedProperties: false here so standard
> Ethernet port properties aren't incorrectly rejected by dt_binding_check
> when present in the device tree?

There aren't any properties from ethernet-controller.yaml used. Again, 
old platform, no new users, and possibly unused.

Rob

  reply	other threads:[~2026-10-02 16:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 20:19 [PATCH net-next v2] dt-bindings: net: Convert HiSilicon hns-dsaf to DT schema Rob Herring (Arm)
2026-10-02  9:13 ` sashiko-bot
2026-10-02 16:50   ` Rob Herring [this message]
2026-10-04 22:15 ` netdev-bot+sashiko
2026-10-05 20:16   ` Rob Herring

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=20261002165036.GA2622685-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox