Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Binding Schema Violation: `additionalProperties: type: object` is an anti-pattern for allowing generic child nodes.
--
--- Patch [1]: [PATCH] dt-bindings: bus: ti,omap-ocp2scp: Convert to DT schema ---
commit 1199d265b1ac5f3fa059bb1936e3713c5ea7ac99
Author: Bhargav Joshi <[email protected]>
dt-bindings: bus: ti,omap-ocp2scp: Convert to DT schema
This commit converts the ti,omap-ocp2scp bridge device tree bindings to
dt-schema. It updates required properties, marks ti,hwmods as deprecated,
and sets additionalProperties to type: object to represent various child
phy devices.
> diff --git a/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml b/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml
> new file mode 100644
> index 0000000000000..a8852185144dc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml
[ ... ]
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: ti,am437x-ocp2scp
> + then:
> + properties:
> + reg: false
> + else:
> + required:
> + - reg
> +
> +additionalProperties:
> + type: object
[Severity: Low]
Is it intentional to use type: object for additionalProperties instead of
patternProperties?
Relying on additionalProperties: type: object requires non-injected properties
to evaluate as objects rather than scalar or array values, which violates
json-schema semantics for standard properties.
Should this instead use patternProperties to explicitly match generic child
node names (e.g., "^[a-zA-Z0-9,\-_.]+(@[0-9a-fA-F]+)?$": type: object)
combined with additionalProperties: false?
> +
> +examples:
> + - |
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
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.