dt-bindings: Add missing start and/or end of line regex anchors
authorRob Herring <robh@kernel.org>
Fri, 18 Nov 2022 22:37:27 +0000 (16:37 -0600)
committerRob Herring <robh@kernel.org>
Tue, 6 Dec 2022 20:50:35 +0000 (14:50 -0600)
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.

Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20221118223728.1721589-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml
Documentation/devicetree/bindings/hwmon/adt7475.yaml
Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
Documentation/devicetree/bindings/pci/mediatek,mt7621-pcie.yaml
Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml
Documentation/devicetree/bindings/regulator/max8660.yaml
Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
Documentation/devicetree/bindings/regulator/regulator.yaml
Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml

index a11e1b867379aae47ca9b18e804b68e40b98e653..3c00ad09eeaab6fc5c79f160cfe01910e97de34a 100644 (file)
@@ -38,7 +38,7 @@ properties:
     type: object
 
     patternProperties:
-      'cpu@[0-9a-f]+':
+      '^cpu@[0-9a-f]+$':
         type: object
 
         properties:
index ea595102a86e2963424a3685c9963b28442b9cee..051c976ab711f6a0473b54f9468d3c908e9ba97a 100644 (file)
@@ -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
index 385b0692261cb54d0df598c27c7a3f0fce61f91d..51f62c3ae1947107d6dc2ee5950076f4b71af42c 100644 (file)
@@ -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
index d60f43fd9c5ad0e6cc0b3b9498c922cb0b55b078..e63e6458cea8f780055744081b281cc9dc522724 100644 (file)
@@ -31,7 +31,7 @@ properties:
     maxItems: 2
 
 patternProperties:
-  'pcie@[0-2],0':
+  '^pcie@[0-2],0$':
     type: object
     $ref: /schemas/pci/pci-bus.yaml#
 
index 0f18cceba3d5ffca3900f3db6a52691c835fed6e..5a0d64d3ae6b9515eca803b7b749960d5144495a 100644 (file)
@@ -65,7 +65,7 @@ properties:
     maxItems: 1
 
 patternProperties:
-  'usb@[0-1],0':
+  '^usb@[0-1],0$':
     type: object
 
     description:
index 9c038698f8804b25032cb5640da3cab8a1eaa4d4..4d550ca396ebf4a395d973ac70c2b7f92cf09139 100644 (file)
@@ -24,7 +24,7 @@ properties:
     type: object
 
     patternProperties:
-      "regulator-.+":
+      "^regulator-.+$":
         $ref: "regulator.yaml#"
 
     additionalProperties: false
index 71138c611b6cf26958b1f8c3ac586e706a79772c..b704f05ea4542ab96fa2756bd82f7f9ff9ce5670 100644 (file)
@@ -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:
index 6e8aa9eed3aa1966414a303073489db2b0ec2f6d..53b81d8a2d41437fecb7ec67858a20e4ef6d9e0f 100644 (file)
@@ -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
index 7cb74cc8c5d969be02d3dbda6b1e3675766ccc16..54be194bb2449a8bb5d4bc614852625642126040 100644 (file)
@@ -21,7 +21,7 @@ description: |
   regulator-voutl1, regulator-vouts1
 
 patternProperties:
-  "regulator-.+":
+  "^regulator-.+$":
     type: object
     description:
       Properties for single regulator.
index 679a246dd666d3f8a2da8906f2e2a989d3692b12..7df40c38e865918f6c38b36fe9795069727d648b 100644 (file)
@@ -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
 
index 6b733e5c116384dd21b2387cab830ba34eee6b44..899100e783c937edeaa746f74e0ae2a868bac814 100644 (file)
@@ -48,7 +48,7 @@ properties:
       - const: tx
 
 patternProperties:
-  "@[0-9a-f]+":
+  "@[0-9a-f]+$":
     type: object
 
     properties: