From: sashiko-bot@kernel.org
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH net-next v2] dt-bindings: net: Convert HiSilicon hns-dsaf to DT schema
Date: Fri, 02 Oct 2026 09:13:40 +0000 [thread overview]
Message-ID: <20261002091340.E8C1C1F0089A@smtp.kernel.org> (raw)
In-Reply-To: <20260930201919.76465-2-robh@kernel.org>
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?
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?
> +
> + properties:
> + reg:
> + maximum: 5
[ ... ]
> + required:
> + - reg
> + - serdes-syscon
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - interrupts
> + - mode
[Severity: Medium]
Should desc-num, buf-size, and subctrl-syscon be included in this
required list?
Looking at hns_dsaf_get_cfg() in
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c, the driver strictly
fails the probe if desc-num or buf-size are omitted.
Furthermore, if subctrl-syscon is missing, the driver's fallback logic
consumes reg index 0 (ppe-base) as the syscon base. Later, when it
attempts to map ppe-base again by name, it fails with an -EBUSY error
and aborts the probe.
Since omitting any of these three properties causes a guaranteed driver
probe failure, shouldn't they be marked as required to ensure invalid
device trees are properly flagged?
> +
> +additionalProperties: false
> +
> +examples:
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260930201919.76465-2-robh@kernel.org?part=1
next prev parent reply other threads:[~2026-10-02 9:13 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 [this message]
2026-10-02 16:50 ` Rob Herring
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=20261002091340.E8C1C1F0089A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox