Re: [PATCH net-next v20 03/10] dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC

[email protected]
Newsgroups dev.linux.lists.mfd,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The `mdio` node explicitly sets `unevaluatedProperties: true`, disabling strict schema validation for its contents.
- [Low] The `reset-gpios` property lacks an item count constraint.
--

--- Patch [3]: [PATCH net-next v20 03/10] dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC ---
commit becec7ba9d50daec0a4bb4e2976f7f7fc33b268e
Author: Christian Marangi <[email protected]>

dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC

This commit documents support for the Airoha AN8855 Switch SoC. The SoC
exposes various peripherals including an Ethernet Switch, an NVMEM provider,
and Ethernet PHYs.

> diff --git a/Documentation/devicetree/bindings/mfd/airoha,an8855.yaml b/Documentation/devicetree/bindings/mfd/airoha,an8855.yaml
> new file mode 100644
> index 0000000000000..472da8384a30e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/airoha,an8855.yaml
> @@ -0,0 +1,175 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/airoha,an8855.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
[ ... ]
> +properties:
> +  compatible:
> +    const: airoha,an8855
> +
> +  reg:
> +    maxItems: 1
> +
> +  reset-gpios: true

[Severity: Low]
Should this property have a maxItems constraint? The core gpios.yaml schema
doesn't restrict the number of array elements.

Without maxItems: 1, could a device tree incorrectly specify multiple reset
lines and silently pass validation?

> +
> +  efuse:
> +    type: object
> +    $ref: /schemas/nvmem/airoha,an8855-efuse.yaml
> +    description: EFUSE exposed by the Airoha AN8855 SoC
> +
> +  ethernet-switch:
> +    type: object
> +    $ref: /schemas/net/dsa/airoha,an8855-switch.yaml
> +    description: Switch exposed by the Airoha AN8855 SoC
> +
> +  mdio:
> +    type: object
> +    $ref: /schemas/net/mdio.yaml#
> +    description: MDIO exposed by the Airoha AN8855 SoC
> +    unevaluatedProperties: true

[Severity: Low]
Should this be unevaluatedProperties: false? 

The core mdio.yaml schema sets additionalProperties: true, so by setting
unevaluatedProperties: true locally, does this schema actively permit
undocumented or misspelled properties in the mdio node to silently pass
validation?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.