[1/2] dt-bindings: serial: fix regex pattern for matching serial node children

Message ID 20231005093247.128166-1-krzysztof.kozlowski@linaro.org
State New
Headers
Series [1/2] dt-bindings: serial: fix regex pattern for matching serial node children |

Commit Message

Krzysztof Kozlowski Oct. 5, 2023, 9:32 a.m. UTC
  The regular expression pattern for matching serial node children should
accept only nodes starting and ending with the set of words: bluetooth,
gnss, gps or mcu.  Add missing brackets to enforce such matching.

Fixes: 0c559bc8abfb ("dt-bindings: serial: restrict possible child node names")
Reported-by: Andreas Kemnade <andreas@kemnade.info>
Closes: https://lore.kernel.org/all/20231004170021.36b32465@aktux/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/serial/serial.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Rob Herring Oct. 6, 2023, 4:58 p.m. UTC | #1
On Thu, 05 Oct 2023 11:32:46 +0200, Krzysztof Kozlowski wrote:
> The regular expression pattern for matching serial node children should
> accept only nodes starting and ending with the set of words: bluetooth,
> gnss, gps or mcu.  Add missing brackets to enforce such matching.
> 
> Fixes: 0c559bc8abfb ("dt-bindings: serial: restrict possible child node names")
> Reported-by: Andreas Kemnade <andreas@kemnade.info>
> Closes: https://lore.kernel.org/all/20231004170021.36b32465@aktux/
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/serial/serial.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>
  

Patch

diff --git a/Documentation/devicetree/bindings/serial/serial.yaml b/Documentation/devicetree/bindings/serial/serial.yaml
index ea277560a596..5727bd549dec 100644
--- a/Documentation/devicetree/bindings/serial/serial.yaml
+++ b/Documentation/devicetree/bindings/serial/serial.yaml
@@ -96,7 +96,7 @@  then:
     rts-gpios: false
 
 patternProperties:
-  "^bluetooth|gnss|gps|mcu$":
+  "^(bluetooth|gnss|gps|mcu)$":
     if:
       type: object
     then: