dt-bindings: Add missing start and/or end of line regex anchors
Subsystems (21)
Rob Herring
maintainerPATCH 1/1 dt-bindings: Add missing start and/or end of line regex anchors
json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten.
--- .../devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 2 +- Documentation/devicetree/bindings/hwmon/adt7475.yaml | 4 ++-- .../bindings/opp/allwinner,sun50i-h6-operating-points.yaml | 4 ++-- .../devicetree/bindings/pci/mediatek,mt7621-pcie.yaml | 2 +- .../devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml | 2 +- Documentation/devicetree/bindings/regulator/max8660.yaml | 2 +- .../devicetree/bindings/regulator/maxim,max77802.yaml | 2 +- Documentation/devicetree/bindings/regulator/regulator.yaml | 2 +- .../devicetree/bindings/regulator/rohm,bd9576-regulator.yaml | 2 +- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 2 +- .../devicetree/bindings/spi/nvidia,tegra210-quad.yaml | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-)
Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml +1 -1
@@ -38,7 +38,7 @@ properties: type: object patternProperties: - 'cpu@[0-9a-f]+': + '^cpu@[0-9a-f]+$': type: object properties:
Documentation/devicetree/bindings/hwmon/adt7475.yaml +2 -2
@@ -61,7 +61,7 @@ patternProperties: $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1] - "adi,pin(5|10)-function": + "^adi,pin(5|10)-function$": description: | Configures the function for pin 5 on the adi,adt7473 and adi,adt7475. Or pin 10 on the adi,adt7476 and adi,adt7490.
@@ -70,7 +70,7 @@ patternProperties: - pwm2 - smbalert# - "adi,pin(9|14)-function": + "^adi,pin(9|14)-function$": description: | Configures the function for pin 9 on the adi,adt7473 and adi,adt7475. Or pin 14 on the adi,adt7476 and adi,adt7490
Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml +2 -2
@@ -41,7 +41,7 @@ required: - nvmem-cells patternProperties: - "opp-[0-9]+": + "^opp-[0-9]+$": type: object properties:
@@ -49,7 +49,7 @@ patternProperties: clock-latency-ns: true patternProperties: - "opp-microvolt-.*": true + "^opp-microvolt-speed[0-9]$": true required: - opp-hz
Documentation/devicetree/bindings/pci/mediatek,mt7621-pcie.yaml +1 -1
@@ -31,7 +31,7 @@ properties: maxItems: 2 patternProperties: - 'pcie@[0-2],0': + '^pcie@[0-2],0$': type: object $ref: /schemas/pci/pci-bus.yaml#
Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml +1 -1
@@ -65,7 +65,7 @@ properties: maxItems: 1 patternProperties: - 'usb@[0-1],0': + '^usb@[0-1],0$': type: object description:
Documentation/devicetree/bindings/regulator/max8660.yaml +1 -1
@@ -24,7 +24,7 @@ properties: type: object patternProperties: - "regulator-.+": + "^regulator-.+$": $ref: "regulator.yaml#" additionalProperties: false
Documentation/devicetree/bindings/regulator/maxim,max77802.yaml +1 -1
@@ -77,7 +77,7 @@ patternProperties: regulator-initial-mode: false patternProperties: - regulator-state-(standby|mem|disk): + "^regulator-state-(standby|mem|disk)$": type: object additionalProperties: true properties:
Documentation/devicetree/bindings/regulator/regulator.yaml +1 -1
@@ -231,7 +231,7 @@ patternProperties: ".*-supply$": description: Input supply phandle(s) for this node - regulator-state-(standby|mem|disk): + "^regulator-state-(standby|mem|disk)$": type: object description: sub-nodes for regulator state in Standby, Suspend-to-RAM, and
Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml +1 -1
@@ -21,7 +21,7 @@ description: | regulator-voutl1, regulator-vouts1 patternProperties: - "regulator-.+": + "^regulator-.+$": type: object description: Properties for single regulator.
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +1 -1
@@ -115,7 +115,7 @@ properties: ports: $ref: /schemas/graph.yaml#/properties/ports patternProperties: - port(@[0-9a-f]+)?: + '^port(@[0-9a-f]+)?$': $ref: audio-graph-port.yaml# unevaluatedProperties: false
Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml +1 -1
@@ -48,7 +48,7 @@ properties: - const: tx patternProperties: - "@[0-9a-f]+": + "@[0-9a-f]+$": type: object properties:
Signature · 1 line
2.35.1
Quoted 8 lines · Rob Herring
json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten.
Signed-off-by Rob Herring <[email protected]>--- .../devicetree/bindings/pci/mediatek,mt7621-pcie.yaml | 2 +-
Thanks,
Sergio Paracuellos
Quoted 3 lines · Rob Herring
json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten.
Quoted 10 lines · Rob Herring
json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten.
Signed-off-by Rob Herring <[email protected]>Acked-by Mark Brown <[email protected]>--- .../devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 2 +- Documentation/devicetree/bindings/hwmon/adt7475.yaml | 4 ++--
For hwmon:
Quoted 172 lines
.../bindings/opp/allwinner,sun50i-h6-operating-points.yaml | 4 ++-- .../devicetree/bindings/pci/mediatek,mt7621-pcie.yaml | 2 +- .../devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml | 2 +- Documentation/devicetree/bindings/regulator/max8660.yaml | 2 +- .../devicetree/bindings/regulator/maxim,max77802.yaml | 2 +- Documentation/devicetree/bindings/regulator/regulator.yaml | 2 +- .../devicetree/bindings/regulator/rohm,bd9576-regulator.yaml | 2 +- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 2 +- .../devicetree/bindings/spi/nvidia,tegra210-quad.yaml | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-)Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml +1
-1@@ -38,7 +38,7 @@ properties: type: object patternProperties: - 'cpu@[0-9a-f]+': + '^cpu@[0-9a-f]+$': type: object properties:Documentation/devicetree/bindings/hwmon/adt7475.yaml +2
-2@@ -61,7 +61,7 @@ patternProperties: $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1] - "adi,pin(5|10)-function": + "^adi,pin(5|10)-function$": description: | Configures the function for pin 5 on the adi,adt7473 and adi,adt7475. Or pin 10 on the adi,adt7476 and adi,adt7490.@@ -70,7 +70,7 @@ patternProperties: - pwm2 - smbalert# - "adi,pin(9|14)-function": + "^adi,pin(9|14)-function$": description: | Configures the function for pin 9 on the adi,adt7473 and adi,adt7475. Or pin 14 on the adi,adt7476 and adi,adt7490Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml +2
-2@@ -41,7 +41,7 @@ required: - nvmem-cells patternProperties: - "opp-[0-9]+": + "^opp-[0-9]+$": type: object properties:@@ -49,7 +49,7 @@ patternProperties: clock-latency-ns: true patternProperties: - "opp-microvolt-.*": true + "^opp-microvolt-speed[0-9]$": true required: - opp-hzDocumentation/devicetree/bindings/pci/mediatek,mt7621-pcie.yaml +1
-1@@ -31,7 +31,7 @@ properties: maxItems: 2 patternProperties: - 'pcie@[0-2],0': + '^pcie@[0-2],0$': type: object $ref: /schemas/pci/pci-bus.yaml#Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml +1
-1@@ -65,7 +65,7 @@ properties: maxItems: 1 patternProperties: - 'usb@[0-1],0': + '^usb@[0-1],0$': type: object description:Documentation/devicetree/bindings/regulator/max8660.yaml +1
-1@@ -24,7 +24,7 @@ properties: type: object patternProperties: - "regulator-.+": + "^regulator-.+$": $ref: "regulator.yaml#" additionalProperties: falseDocumentation/devicetree/bindings/regulator/maxim,max77802.yaml +1
-1@@ -77,7 +77,7 @@ patternProperties: regulator-initial-mode: false patternProperties: - regulator-state-(standby|mem|disk): + "^regulator-state-(standby|mem|disk)$": type: object additionalProperties: true properties:Documentation/devicetree/bindings/regulator/regulator.yaml +1
-1@@ -231,7 +231,7 @@ patternProperties: ".*-supply$": description: Input supply phandle(s) for this node - regulator-state-(standby|mem|disk): + "^regulator-state-(standby|mem|disk)$": type: object description: sub-nodes for regulator state in Standby, Suspend-to-RAM, andDocumentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml +1
-1@@ -21,7 +21,7 @@ description: | regulator-voutl1, regulator-vouts1 patternProperties: - "regulator-.+": + "^regulator-.+$": type: object description: Properties for single regulator.Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +1
-1@@ -115,7 +115,7 @@ properties: ports: $ref: /schemas/graph.yaml#/properties/ports patternProperties: - port(@[0-9a-f]+)?: + '^port(@[0-9a-f]+)?$': $ref: audio-graph-port.yaml# unevaluatedProperties: falseDocumentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml +1
-1@@ -48,7 +48,7 @@ properties: - const: tx patternProperties: - "@[0-9a-f]+": + "@[0-9a-f]+$": type: object properties:
Hi Rob,
Quoted 6 lines
From: Rob Herring, Sent: Saturday, November 19, 2022 7:37 AM
json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten.
Quoted 7 lines
Signed-off-by Rob Herring <[email protected]>--- .../devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 2 +- Documentation/devicetree/bindings/hwmon/adt7475.yaml | 4 ++-- .../bindings/opp/allwinner,sun50i-h6-operating-points.yaml | 4 ++-- .../devicetree/bindings/pci/mediatek,mt7621-pcie.yaml | 2 +- .../devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml | 2 +-
Thank you for the patch! For R-Car PCI,
Best regards,
Yoshihiro Shimoda
Quoted 47 lines · Rob Herring
json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten.
Signed-off-by Rob Herring <[email protected]>--- .../devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml | 2 +- Documentation/devicetree/bindings/hwmon/adt7475.yaml | 4 ++-- .../bindings/opp/allwinner,sun50i-h6-operating-points.yaml | 4 ++-- .../devicetree/bindings/pci/mediatek,mt7621-pcie.yaml | 2 +- .../devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml | 2 +- Documentation/devicetree/bindings/regulator/max8660.yaml | 2 +- .../devicetree/bindings/regulator/maxim,max77802.yaml | 2 +- Documentation/devicetree/bindings/regulator/regulator.yaml | 2 +- .../devicetree/bindings/regulator/rohm,bd9576-regulator.yaml | 2 +- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 2 +- .../devicetree/bindings/spi/nvidia,tegra210-quad.yaml | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-)Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml +1
-1@@ -38,7 +38,7 @@ properties: type: object patternProperties: - 'cpu@[0-9a-f]+': + '^cpu@[0-9a-f]+$': type: object properties:Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml +1
-1@@ -41,7 +41,7 @@ required: - nvmem-cells patternProperties: - "opp-[0-9]+": + "^opp-[0-9]+$": type: object properties:
Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml patternProperties: · line 55
Quoted 8 lines
Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml +1
-1@@ -49,7 +49,7 @@ patternProperties: clock-latency-ns: true patternProperties: - "opp-microvolt-.*": true + "^opp-microvolt-speed[0-9]$": true required: - opp-hz
Signature · 1 line
viresh
Quoted 8 lines · Rob Herring
json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten.
Signed-off-by Rob Herring <[email protected]>.../devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml | 2 +- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 2 +-
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 8 lines · Rob Herring
json-schema patterns by default will match anywhere in a string, so typically we want at least the start or end anchored. Fix the obvious cases where the anchors were forgotten.
Signed-off-by Rob Herring <[email protected]>---
.../devicetree/bindings/regulator/rohm,bd9576-regulator.yaml | 2 +-
Signature · 5 lines
Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~