Skip to contentSkip to conversation

ASoC: dt-bindings: stm32: Ensure compatible pattern matches whole string

PATCH In review Rob Herring (Arm) 3 participants 3 messages May 20, 2024 – May 21, 2024

Subsystems (5)
lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 ASoC: dt-bindings: stm32: Ensure compatible pattern matches whole string

The compatible pattern "st,stm32-sai-sub-[ab]" is missing starting and ending anchors, so any prefix and/or suffix would still be valid.

This also fixes a warning on the example:

Documentation/devicetree/bindings/sound/st,stm32-sai.example.dtb: /example-0/sai@4400b000/audio-controller@4400b004: failed to match any schema with compatible: ['st,stm32-sai-sub-a']

---
 Documentation/devicetree/bindings/sound/st,stm32-sai.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml +1 -1
index 59df8a832310..f555ccd6b00a 100644
@@ -68,7 +68,7 @@ patternProperties:
     properties:
       compatible:
         description: Compatible for SAI sub-block A or B.
-        pattern: "st,stm32-sai-sub-[ab]"
+        pattern: "^st,stm32-sai-sub-[ab]$"
 
       "#sound-dai-cells":
         const: 0
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Rob Herring (Arm)

The compatible pattern "st,stm32-sai-sub-[ab]" is missing starting and ending anchors, so any prefix and/or suffix would still be valid.

This also fixes a warning on the example:

Documentation/devicetree/bindings/sound/st,stm32-sai.example.dtb: /example-0/sai@4400b000/audio-controller@4400b004: failed to match any schema with compatible: ['st,stm32-sai-sub-a']

---
  Documentation/devicetree/bindings/sound/st,stm32-sai.yaml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml +0 -0
index 59df8a832310..f555ccd6b00a 100644

Documentation/devicetree/bindings/sound/st,stm32-sai.yaml patternProperties: · line 74

Quoted 8 lines
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml +1 -1
@@ -68,7 +68,7 @@ patternProperties:
      properties:
        compatible:
          description: Compatible for SAI sub-block A or B.
-        pattern: "st,stm32-sai-sub-[ab]"
+        pattern: "^st,stm32-sai-sub-[ab]$"
 
        "#sound-dai-cells":
          const: 0

Thanks
Olivier

maintainer
#2 lore raw
In reply to Rob Herring (Arm)
Quoted 8 lines · Rob Herring (Arm)

The compatible pattern "st,stm32-sai-sub-[ab]" is missing starting and ending anchors, so any prefix and/or suffix would still be valid.

This also fixes a warning on the example:

Documentation/devicetree/bindings/sound/st,stm32-sai.example.dtb: /example-0/sai@4400b000/audio-controller@4400b004: failed to match any schema with compatible: ['st,stm32-sai-sub-a']

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: dt-bindings: stm32: Ensure compatible pattern matches whole string

      commit: 737ce4fb96206f999ddea7530145fc0e8abd5d31

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark