dt-bindings: Drop redundant maxItems/items
Subsystems (11)
Rob Herring
maintainerPATCH 1/1 dt-bindings: Drop redundant maxItems/items
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
A meta-schema check for this is pending once these existing cases are fixed.
--- .../devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 1 - Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml | 1 - Documentation/devicetree/bindings/mailbox/arm,mhu.yaml | 1 - .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml | 2 -- Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml | 1 - Documentation/devicetree/bindings/usb/renesas,usbhs.yaml | 3 --- 6 files changed, 9 deletions(-)
Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml +0 -1
@@ -98,7 +98,6 @@ properties: maxItems: 1 dmas: - maxItems: 4 items: - description: Video layer, plane 0 (RGB or luma) - description: Video layer, plane 1 (U/V or U)
Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml +0 -1
@@ -73,7 +73,6 @@ properties: maxItems: 1 clock-names: - maxItems: 1 items: - const: fck
Documentation/devicetree/bindings/mailbox/arm,mhu.yaml +0 -1
@@ -61,7 +61,6 @@ properties: - description: low-priority non-secure - description: high-priority non-secure - description: Secure - maxItems: 3 clocks: maxItems: 1
Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml +0 -2
@@ -44,7 +44,6 @@ properties: maxItems: 3 clock-names: - maxItems: 3 items: - const: hda - const: hda2hdmi
@@ -54,7 +53,6 @@ properties: maxItems: 3 reset-names: - maxItems: 3 items: - const: hda - const: hda2hdmi
Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml +0 -1
@@ -51,7 +51,6 @@ properties: maxItems: 1 phy-names: - maxItems: 1 items: - const: usb
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +0 -3
@@ -74,11 +74,8 @@ properties: phys: maxItems: 1 - items: - - description: phandle + phy specifier pair. phy-names: - maxItems: 1 items: - const: usb
Signature · 6 lines
2.27.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Rob,
Quoted 7 lines · Rob Herring
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
A meta-schema check for this is pending once these existing cases are fixed.
Quoted 10 lines
Cc Laurent Pinchart <[email protected]>Cc Vinod Koul <[email protected]>Cc Mark Brown <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Jassi Brar <[email protected]>Signed-off-by Rob Herring <[email protected]>
With one comment below,
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml properties: · line 78
Quoted 11 lines
---
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +0
-2@@ -74,11 +74,8 @@ properties: phys: maxItems: 1 - items: - - description: phandle + phy specifier pair.
The description may help some people, so keeping the description and deleting maxItems would maybe be better.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Herring
maintainerQuoted 32 lines · Sam Ravnborg
Hi Rob,
Quoted 7 lines · Rob Herring
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
A meta-schema check for this is pending once these existing cases are fixed.
Quoted 10 lines
Cc Laurent Pinchart <[email protected]>Cc Vinod Koul <[email protected]>Cc Mark Brown <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Jassi Brar <[email protected]>Signed-off-by Rob Herring <[email protected]>With one comment below,
Acked-by Sam Ravnborg <[email protected]>Quoted 7 lines
---
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +0
-0@@ -74,11 +74,8 @@ properties:
Quoted 7 lines
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml properties: · line 78
Quoted 4 lines
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +0
-2phys: maxItems: 1 - items: - - description: phandle + phy specifier pair.The description may help some people, so keeping the description and deleting maxItems would maybe be better.
Do we really want to describe 'phys' hundreds of times? No. The question I ask on the descriptions is could it be generated instead.
Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Laurent Pinchart
maintainerQuoted 41 lines · Rob Herring
Quoted 32 lines · Sam Ravnborg
Hi Rob,
Quoted 7 lines · Rob Herring
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
A meta-schema check for this is pending once these existing cases are fixed.
Quoted 10 lines
Cc Laurent Pinchart <[email protected]>Cc Vinod Koul <[email protected]>Cc Mark Brown <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Jassi Brar <[email protected]>Signed-off-by Rob Herring <[email protected]>With one comment below,
Acked-by Sam Ravnborg <[email protected]>Quoted 7 lines
---
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +0
-0@@ -74,11 +74,8 @@ properties:Quoted 7 lines
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml properties: · line 78
Quoted 4 lines
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +0
-2phys: maxItems: 1 - items: - - description: phandle + phy specifier pair.The description may help some people, so keeping the description and deleting maxItems would maybe be better.
Quoted 2 lines
Do we really want to describe 'phys' hundreds of times? No. The question I ask on the descriptions is could it be generated instead.
I agree. If the description had mentioned why particular PHY was referenced, I would have kept that, but "the phy is a phy" is probably not something we want to duplicate everywhere.
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Rob,
Quoted 18 lines
Quoted 10 lines
With one comment below,
Acked-by Sam Ravnborg <[email protected]>Quoted 7 lines
---
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +0
-0@@ -74,11 +74,8 @@ properties:Quoted 7 lines
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml properties: · line 78
Quoted 4 lines
Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +0
-2phys: maxItems: 1 - items: - - description: phandle + phy specifier pair.The description may help some people, so keeping the description and deleting maxItems would maybe be better.
Quoted 1 line
Do we really want to describe 'phys' hundreds of times? No.
Agree, for common properties we as a minimum want a phy-common.yaml or some such - and have the description exactly once.
Quoted 2 lines
The
question I ask on the descriptions is could it be generated instead.
That could also be an idea, but assuming most people look at the source then the same "most people" would miss the generated descriptions.
But to be clear - I see that phys: is a commonly used property so no problem to have the description dropped here.
Ack still stands.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Rob,
Thank you for the patch.
Quoted 7 lines · Rob Herring
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
A meta-schema check for this is pending once these existing cases are fixed.
Quoted 10 lines
Cc Laurent Pinchart <[email protected]>Cc Vinod Koul <[email protected]>Cc Mark Brown <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Jassi Brar <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 93 lines
--- .../devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 1 - Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml | 1 - Documentation/devicetree/bindings/mailbox/arm,mhu.yaml | 1 - .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml | 2 -- Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml | 1 - Documentation/devicetree/bindings/usb/renesas,usbhs.yaml | 3 --- 6 files changed, 9 deletions(-)Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml +0
-1@@ -98,7 +98,6 @@ properties: maxItems: 1 dmas: - maxItems: 4 items: - description: Video layer, plane 0 (RGB or luma) - description: Video layer, plane 1 (U/V or U)Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml +0
-1@@ -73,7 +73,6 @@ properties: maxItems: 1 clock-names: - maxItems: 1 items: - const: fckDocumentation/devicetree/bindings/mailbox/arm,mhu.yaml +0
-1@@ -61,7 +61,6 @@ properties: - description: low-priority non-secure - description: high-priority non-secure - description: Secure - maxItems: 3 clocks: maxItems: 1Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml +0
-2@@ -44,7 +44,6 @@ properties: maxItems: 3 clock-names: - maxItems: 3 items: - const: hda - const: hda2hdmi@@ -54,7 +53,6 @@ properties: maxItems: 3 reset-names: - maxItems: 3 items: - const: hda - const: hda2hdmiDocumentation/devicetree/bindings/usb/renesas,usb-xhci.yaml +0
-1@@ -51,7 +51,6 @@ properties: maxItems: 1 phy-names: - maxItems: 1 items: - const: usbDocumentation/devicetree/bindings/usb/renesas,usbhs.yaml +0
-3@@ -74,11 +74,8 @@ properties: phys: maxItems: 1 - items: - - description: phandle + phy specifier pair. phy-names: - maxItems: 1 items: - const: usb
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Rob Herring
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
A meta-schema check for this is pending once these existing cases are fixed.
--- .../devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 1 - Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml | 1 -
Signature · 5 lines
~Vinod _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 18 lines · Rob Herring
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
A meta-schema check for this is pending once these existing cases are fixed.
Cc Laurent Pinchart <[email protected]>Cc Vinod Koul <[email protected]>Cc Mark Brown <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Jassi Brar <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 8 lines
--- .../devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 1 - Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml | 1 - Documentation/devicetree/bindings/mailbox/arm,mhu.yaml | 1 - .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml | 2 -- Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml | 1 - Documentation/devicetree/bindings/usb/renesas,usbhs.yaml | 3 --- 6 files changed, 9 deletions(-)
Quoted 3 lines · Rob Herring
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Rob Herring
'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list.
A meta-schema check for this is pending once these existing cases are fixed.
Quoted 10 lines
Cc Laurent Pinchart <[email protected]>Cc Vinod Koul <[email protected]>Cc Mark Brown <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Jassi Brar <[email protected]>Signed-off-by Rob Herring <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel