Skip to contentSkip to conversation

dt-bindings: arm: vexpress-config: Drop ineffective label limits

PATCH Superseded Sudeep Holla 3 participants 3 messages Nov 4

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Sudeep Holla

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: arm: vexpress-config: Drop ineffective label limits

The core Devicetree schema defines label as a scalar string. The vexpress-config regulator, amp, temp, power and energy child schemas apply maxItems: 1 to label. This keyword constrains arrays and has no effect on a string value.

Remove these ineffective constraints from the child schemas.

---
 .../devicetree/bindings/arm/vexpress-config.yaml  | 15 ---------------
 1 file changed, 15 deletions(-)
Documentation/devicetree/bindings/arm/vexpress-config.yaml +0 -15
index b04e8e052181..2d4eff19292b 100644
@@ -154,9 +154,6 @@ additionalProperties: false
           - const: 2
           - description: device number
 
-      label:
-        maxItems: 1
-
     unevaluatedProperties: false
     required:
       - compatible
@@ -175,9 +172,6 @@ additionalProperties: false
           - const: 3
           - description: device number
 
-      label:
-        maxItems: 1
-
     additionalProperties: false
     required:
       - compatible
@@ -196,9 +190,6 @@ additionalProperties: false
           - const: 4
           - description: device number
 
-      label:
-        maxItems: 1
-
     additionalProperties: false
     required:
       - compatible
@@ -235,9 +226,6 @@ additionalProperties: false
           - const: 12
           - description: device number
 
-      label:
-        maxItems: 1
-
     additionalProperties: false
     required:
       - compatible
@@ -262,9 +250,6 @@ additionalProperties: false
               - const: 13
               - description: second device number
 
-      label:
-        maxItems: 1
-
     additionalProperties: false
     required:
       - compatible
Signature · 1 line
2.43.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] dt-bindings: arm: vexpress-config: removing label disallows valid DT property --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: arm: vexpress-config: removing label disallows valid DT property --

commit 4a11da8feaabaee63d050894e37aa89a526904b2
Author: Sudeep Holla <[email protected]>

dt-bindings: arm: vexpress-config: Drop ineffective label limits

This commit removes the label property definitions with maxItems: 1 from the regulator, amp, temp, power, and energy child node schemas in Documentation/devicetree/bindings/arm/vexpress-config.yaml.

Quoted 45 lines
Documentation/devicetree/bindings/arm/vexpress-config.yaml +0 -12
index b04e8e0521815..2d4eff19292b8 100644
@@ -154,9 +154,6 @@ patternProperties:
           - const: 2
           - description: device number
 
-      label:
-        maxItems: 1
-
     unevaluatedProperties: false
     required:
       - compatible
@@ -175,9 +172,6 @@ patternProperties:
           - const: 3
           - description: device number
 
-      label:
-        maxItems: 1
-
     additionalProperties: false
     required:
       - compatible
@@ -196,9 +190,6 @@ patternProperties:
           - const: 4
           - description: device number
 
-      label:
-        maxItems: 1
-
     additionalProperties: false
     required:
       - compatible
@@ -235,9 +226,6 @@ patternProperties:
           - const: 12
           - description: device number
 
-      label:
-        maxItems: 1
-
     additionalProperties: false
     required:
       - compatible

Documentation/devicetree/bindings/arm/vexpress-config.yaml patternProperties: · line 253

Quoted 7 lines
Documentation/devicetree/bindings/arm/vexpress-config.yaml +0 -3
@@ -262,9 +250,6 @@ patternProperties:
               - const: 13
               - description: second device number
 
-      label:
-        maxItems: 1
-
     additionalProperties: false

[Severity: Medium]
Does removing the label entries entirely instead of replacing them with
label: true disallow the label property on these child nodes and break dtbs_check?

Although the core dtschema defines the type of label when present, ^regulator-.+$ specifies unevaluatedProperties: false (and references /schemas/regulator/regulator.yaml#, which does not define label), while ^amp-.+$, ^temp-.+$, ^power-.+$, and ^energy(-.+)?$ specify
additionalProperties: false. Without label listed in properties, any label property on these nodes will be rejected as an unexpected property.

In-tree Versatile Express device trees (such as arch/arm/boot/dts/arm/vexpress-v2p-ca15-tc1.dts and arch/arm/boot/dts/arm/vexpress-v2m.dtsi) define label on these child nodes, and drivers/hwmon/vexpress-hwmon.c reads it in vexpress_hwmon_label_show() and vexpress_hwmon_attr_is_visible():

    const char *label = of_get_property(dev->of_node, "label", NULL);

Should these five entries be changed to label: true so that the property remains permitted while dropping the ineffective maxItems: 1 constraint?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Acked-by on v1 1/1
#2 lore raw
In reply to Sudeep Holla
Quoted 10 lines · Sudeep Holla

The core Devicetree schema defines label as a scalar string. The vexpress-config regulator, amp, temp, power and energy child schemas apply maxItems: 1 to label. This keyword constrains arrays and has no effect on a string value.

Remove these ineffective constraints from the child schemas.

Also, incomplete CC list?