Skip to contentSkip to conversation

dt-bindings: mtd: partitions: Fix partition node name pattern

PATCH In review Rob Herring 4 participants 4 messages Jan 20, 2023 – Jan 30, 2023

Subsystems (2)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: mtd: partitions: Fix partition node name pattern

The 'partition' node name pattern is missing start and end anchors, so anything is allowed before or after the regex pattern. There's no in tree users needing that, so add anchors to the pattern.

---
 .../devicetree/bindings/mtd/partitions/partitions.yaml          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/partitions/partitions.yaml +1 -1
index 9aca4e6c6047..2edc65e0e361 100644
@@ -32,7 +32,7 @@ properties:
     enum: [1, 2]
 
 patternProperties:
-  "partition(-.+|@[0-9a-f]+)":
+  "^partition(-.+|@[0-9a-f]+)$":
     $ref: partition.yaml
 
 required:
Signature · 1 line
2.39.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Rob Herring

The 'partition' node name pattern is missing start and end anchors, so anything is allowed before or after the regex pattern. There's no in tree users needing that, so add anchors to the pattern.

Signature · 12 lines
Regards,
Pratyush Yadav



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
Reviewed-by on v1 1/1
#2 lore raw
In reply to Rob Herring
Quoted 6 lines · Rob Herring

The 'partition' node name pattern is missing start and end anchors, so anything is allowed before or after the regex pattern. There's no in tree users needing that, so add anchors to the pattern.

---

Quoted 16 lines
  .../devicetree/bindings/mtd/partitions/partitions.yaml          | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/partitions/partitions.yaml +1 -1
index 9aca4e6c6047..2edc65e0e361 100644
@@ -32,7 +32,7 @@ properties:
      enum: [1, 2]
 
  patternProperties:
-  "partition(-.+|@[0-9a-f]+)":
+  "^partition(-.+|@[0-9a-f]+)$":
      $ref: partition.yaml
 
  required:
Signature · 3 lines
Best regards,
Dhruva Gole
Texas Instruments Incorporated
maintainer
#3 lore raw
In reply to Rob Herring

Hi Rob,

[email protected] wrote on Thu, 19 Jan 2023 20:04:53 -0600:

Quoted 6 lines

The 'partition' node name pattern is missing start and end anchors, so anything is allowed before or after the regex pattern. There's no in tree users needing that, so add anchors to the pattern.

---

Looks like my scripts did not properly sent the "applied" e-mail, so here it is, I applied this patch to mtd/next.

Thanks,
Miquèl