Skip to contentSkip to conversation

dt-bindings: Fix 'enum' lists with duplicate entries

PATCH Applied Rob Herring 4 participants 5 messages Apr 1, 2022 – Apr 4, 2022

Subsystems (8)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: Fix 'enum' lists with duplicate entries

There's no reason to list the same value twice in an 'enum'. Fix all the occurrences in the tree. A meta-schema change will catch future ones.

Cc Krzysztof Kozlowski <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Jonathan Hunter <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Charles Keepax <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Yunfei Dong <[email protected]>

---
There's also one other occurrence in snps,dwmac.yaml I didn't fix as there's a patch[1] for it which prompted this patch.

Rob

[1] https://lore.kernel.org/r/20220401030847epcms1p8cf7a8e1d8cd7d325dacf30f78da36328@epcms1p8

 .../bindings/arm/tegra/nvidia,tegra20-pmc.yaml        |  1 -
 Documentation/devicetree/bindings/bus/ti-sysc.yaml    |  1 -
 .../bindings/media/mediatek,vcodec-encoder.yaml       |  1 -
 .../devicetree/bindings/pinctrl/cirrus,madera.yaml    | 11 +++++------
 .../devicetree/bindings/power/supply/bq2415x.yaml     |  1 -
 5 files changed, 5 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.yaml +0 -1
index 0afec83cc723..564ae6aaccf7 100644
@@ -13,7 +13,6 @@ maintainers:
 properties:
   compatible:
     enum:
-      - nvidia,tegra20-pmc
       - nvidia,tegra20-pmc
       - nvidia,tegra30-pmc
       - nvidia,tegra114-pmc
Documentation/devicetree/bindings/bus/ti-sysc.yaml +0 -1
index bd40213302da..fced4082b047 100644
@@ -34,7 +34,6 @@ properties:
     oneOf:
       - items:
           - enum:
-              - ti,sysc-omap2
               - ti,sysc-omap2
               - ti,sysc-omap4
               - ti,sysc-omap4-simple
Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +0 -1
index e7b65a91c92c..df7df06c378f 100644
@@ -106,7 +106,6 @@ allOf:
           enum:
             - mediatek,mt8173-vcodec-enc
             - mediatek,mt8192-vcodec-enc
-            - mediatek,mt8173-vcodec-enc
 
     then:
       properties:
Documentation/devicetree/bindings/pinctrl/cirrus,madera.yaml +5 -6
index 8a90d8273767..6bd42e43cdab 100644
@@ -48,13 +48,12 @@ properties:
               Name of one pin group to configure.
             enum: [ aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1,
                     pdmspk2, dmic4, dmic5, dmic6, gpio1, gpio2, gpio3,
-                    gpio4, gpio5, gpio6, gpio7, gpio7, gpio8, gpio9,
+                    gpio4, gpio5, gpio6, gpio7, gpio8, gpio9,
                     gpio10, gpio11, gpio12, gpio13, gpio14, gpio15,
-                    gpio16, gpio17, gpio17, gpio18, gpio19, gpio20,
-                    gpio21, gpio22, gpio23, gpio24, gpio25, gpio26,
-                    gpio27, gpio27, gpio28, gpio29, gpio30, gpio31,
-                    gpio32, gpio33, gpio34, gpio35, gpio36, gpio37,
-                    gpio37, gpio38, gpio39 ]
+                    gpio16, gpio17, gpio18, gpio19, gpio20, gpio21,
+                    gpio22, gpio23, gpio24, gpio25, gpio26, gpio27,
+                    gpio28, gpio29, gpio30, gpio31, gpio32, gpio33,
+                    gpio34, gpio35, gpio36, gpio37, gpio38, gpio39 ]
 
           function:
             description:
Documentation/devicetree/bindings/power/supply/bq2415x.yaml +0 -1
index f8461f06e6f4..118cf484cc69 100644
@@ -16,7 +16,6 @@ allOf:
 properties:
   compatible:
     enum:
-      - ti,bq24150
       - ti,bq24150
       - ti,bq24150a
       - ti,bq24151
Signature · 1 line
2.32.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Rob Herring

There's no reason to list the same value twice in an 'enum'. Fix all the occurrences in the tree. A meta-schema change will catch future ones.

Cc Krzysztof Kozlowski <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Jonathan Hunter <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Charles Keepax <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Yunfei Dong <[email protected]>
Quoted 1 line

---

Thanks,
Charles

Acked-by on v1 1/1
#2 lore raw
In reply to Rob Herring

Hi,

Quoted 18 lines · Rob Herring

There's no reason to list the same value twice in an 'enum'. Fix all the occurrences in the tree. A meta-schema change will catch future ones.

Cc Krzysztof Kozlowski <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Jonathan Hunter <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Charles Keepax <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Yunfei Dong <[email protected]>
Quoted 1 line

---

-- Sebastian

Quoted 88 lines

There's also one other occurrence in snps,dwmac.yaml I didn't fix as there's a patch[1] for it which prompted this patch.

Rob

[1] https://lore.kernel.org/r/20220401030847epcms1p8cf7a8e1d8cd7d325dacf30f78da36328@epcms1p8

 .../bindings/arm/tegra/nvidia,tegra20-pmc.yaml        |  1 -
 Documentation/devicetree/bindings/bus/ti-sysc.yaml    |  1 -
 .../bindings/media/mediatek,vcodec-encoder.yaml       |  1 -
 .../devicetree/bindings/pinctrl/cirrus,madera.yaml    | 11 +++++------
 .../devicetree/bindings/power/supply/bq2415x.yaml     |  1 -
 5 files changed, 5 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.yaml +0 -1
index 0afec83cc723..564ae6aaccf7 100644
@@ -13,7 +13,6 @@ maintainers:
 properties:
   compatible:
     enum:
-      - nvidia,tegra20-pmc
       - nvidia,tegra20-pmc
       - nvidia,tegra30-pmc
       - nvidia,tegra114-pmc
Documentation/devicetree/bindings/bus/ti-sysc.yaml +0 -1
index bd40213302da..fced4082b047 100644
@@ -34,7 +34,6 @@ properties:
     oneOf:
       - items:
           - enum:
-              - ti,sysc-omap2
               - ti,sysc-omap2
               - ti,sysc-omap4
               - ti,sysc-omap4-simple
Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +0 -1
index e7b65a91c92c..df7df06c378f 100644
@@ -106,7 +106,6 @@ allOf:
           enum:
             - mediatek,mt8173-vcodec-enc
             - mediatek,mt8192-vcodec-enc
-            - mediatek,mt8173-vcodec-enc
 
     then:
       properties:
Documentation/devicetree/bindings/pinctrl/cirrus,madera.yaml +5 -6
index 8a90d8273767..6bd42e43cdab 100644
@@ -48,13 +48,12 @@ properties:
               Name of one pin group to configure.
             enum: [ aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1,
                     pdmspk2, dmic4, dmic5, dmic6, gpio1, gpio2, gpio3,
-                    gpio4, gpio5, gpio6, gpio7, gpio7, gpio8, gpio9,
+                    gpio4, gpio5, gpio6, gpio7, gpio8, gpio9,
                     gpio10, gpio11, gpio12, gpio13, gpio14, gpio15,
-                    gpio16, gpio17, gpio17, gpio18, gpio19, gpio20,
-                    gpio21, gpio22, gpio23, gpio24, gpio25, gpio26,
-                    gpio27, gpio27, gpio28, gpio29, gpio30, gpio31,
-                    gpio32, gpio33, gpio34, gpio35, gpio36, gpio37,
-                    gpio37, gpio38, gpio39 ]
+                    gpio16, gpio17, gpio18, gpio19, gpio20, gpio21,
+                    gpio22, gpio23, gpio24, gpio25, gpio26, gpio27,
+                    gpio28, gpio29, gpio30, gpio31, gpio32, gpio33,
+                    gpio34, gpio35, gpio36, gpio37, gpio38, gpio39 ]
 
           function:
             description:
Documentation/devicetree/bindings/power/supply/bq2415x.yaml +0 -1
index f8461f06e6f4..118cf484cc69 100644
@@ -16,7 +16,6 @@ allOf:
 properties:
   compatible:
     enum:
-      - ti,bq24150
       - ti,bq24150
       - ti,bq24150a
       - ti,bq24151
Signature · 1 line
2.32.0
Reviewed-by on v1 1/1
#3 lore raw
In reply to Rob Herring
Quoted 24 lines · Rob Herring

There's no reason to list the same value twice in an 'enum'. Fix all the occurrences in the tree. A meta-schema change will catch future ones.

Cc Krzysztof Kozlowski <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Jonathan Hunter <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Charles Keepax <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Yunfei Dong <[email protected]>

---
There's also one other occurrence in snps,dwmac.yaml I didn't fix as there's a patch[1] for it which prompted this patch.

Rob

Quoted 9 lines

[1] https://lore.kernel.org/r/20220401030847epcms1p8cf7a8e1d8cd7d325dacf30f78da36328@epcms1p8

 .../bindings/arm/tegra/nvidia,tegra20-pmc.yaml        |  1 -
 Documentation/devicetree/bindings/bus/ti-sysc.yaml    |  1 -
 .../bindings/media/mediatek,vcodec-encoder.yaml       |  1 -
 .../devicetree/bindings/pinctrl/cirrus,madera.yaml    | 11 +++++------
 .../devicetree/bindings/power/supply/bq2415x.yaml     |  1 -
 5 files changed, 5 insertions(+), 10 deletions(-)

Best regards,
Krzysztof

author maintainer Applied
#4 lore raw
In reply to Rob Herring
Quoted 24 lines · Rob Herring

There's no reason to list the same value twice in an 'enum'. Fix all the occurrences in the tree. A meta-schema change will catch future ones.

Cc Krzysztof Kozlowski <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Jonathan Hunter <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Charles Keepax <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Yunfei Dong <[email protected]>

---
There's also one other occurrence in snps,dwmac.yaml I didn't fix as there's a patch[1] for it which prompted this patch.

Rob

Quoted 9 lines

[1] https://lore.kernel.org/r/20220401030847epcms1p8cf7a8e1d8cd7d325dacf30f78da36328@epcms1p8

 .../bindings/arm/tegra/nvidia,tegra20-pmc.yaml        |  1 -
 Documentation/devicetree/bindings/bus/ti-sysc.yaml    |  1 -
 .../bindings/media/mediatek,vcodec-encoder.yaml       |  1 -
 .../devicetree/bindings/pinctrl/cirrus,madera.yaml    | 11 +++++------
 .../devicetree/bindings/power/supply/bq2415x.yaml     |  1 -
 5 files changed, 5 insertions(+), 10 deletions(-)

Applied, thanks!