[RESEND PATCH 5.10.y-cip 33/40] dt-bindings: Drop redundant minItems/maxItems


Lad Prabhakar
 

From: Rob Herring <robh@...>

commit 972d6a7dcec3ad3226661034c5d8cb2d30585157 upstream.

If a property has an 'items' list, then a 'minItems' or 'maxItems' with the
same size as the list is redundant and can be dropped. Note that is DT
schema specific behavior and not standard json-schema behavior. The tooling
will fixup the final schema adding any unspecified minItems/maxItems.

This condition is partially checked with the meta-schema already, but
only if both 'minItems' and 'maxItems' are equal to the 'items' length.
An improved meta-schema is pending.

Cc: Jens Axboe <axboe@...>
Cc: Stephen Boyd <sboyd@...>
Cc: Herbert Xu <herbert@...>
Cc: "David S. Miller" <davem@...>
Cc: David Airlie <airlied@...>
Cc: Daniel Vetter <daniel@...>
Cc: Bartosz Golaszewski <bgolaszewski@...>
Cc: Kamal Dasu <kdasu.kdev@...>
Cc: Lars-Peter Clausen <lars@...>
Cc: Thomas Gleixner <tglx@...>
Cc: Marc Zyngier <maz@...>
Cc: Joerg Roedel <joro@...>
Cc: Mauro Carvalho Chehab <mchehab@...>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...>
Cc: Jakub Kicinski <kuba@...>
Cc: Wolfgang Grandegger <wg@...>
Cc: Andrew Lunn <andrew@...>
Cc: Vivien Didelot <vivien.didelot@...>
Cc: Vladimir Oltean <olteanv@...>
Cc: Bjorn Helgaas <bhelgaas@...>
Cc: Kishon Vijay Abraham I <kishon@...>
Cc: Linus Walleij <linus.walleij@...>
Cc: "Uwe Kleine-K├Ânig" <u.kleine-koenig@...>
Cc: Lee Jones <lee.jones@...>
Cc: Ohad Ben-Cohen <ohad@...>
Cc: Mathieu Poirier <mathieu.poirier@...>
Cc: Paul Walmsley <paul.walmsley@...>
Cc: Palmer Dabbelt <palmer@...>
Cc: Albert Ou <aou@...>
Cc: Alessandro Zummo <a.zummo@...>
Cc: Alexandre Belloni <alexandre.belloni@...>
Cc: Zhang Rui <rui.zhang@...>
Cc: Daniel Lezcano <daniel.lezcano@...>
Cc: Wim Van Sebroeck <wim@...>
Cc: Guenter Roeck <linux@...>
Signed-off-by: Rob Herring <robh@...>
Acked-by: Marc Kleine-Budde <mkl@...>
Acked-by: Ulf Hansson <ulf.hansson@...> # for MMC
Acked-by: Jassi Brar <jassisinghbrar@...>
Acked-By: Vinod Koul <vkoul@...>
Reviewed-by: Greg Kroah-Hartman <gregkh@...>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@...>
Acked-by: Mark Brown <broonie@...>
Acked-by: Philipp Zabel <p.zabel@...>
Acked-by: Wolfram Sang <wsa@...> # for I2C
Acked-by: Jonathan Cameron <Jonathan.Cameron@...>
Link: https://lore.kernel.org/r/20210615191543.1043414-1-robh@kernel.org
[PL: Only applies changes to renesas,sdhi.yaml]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
---
Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml | 2 --
1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
index 6c13703b31db..21afaf9e7676 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
+++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
@@ -74,7 +74,6 @@ properties:

clock-names:
minItems: 1
- maxItems: 2
items:
- const: core
- const: cd
@@ -106,7 +105,6 @@ properties:

pinctrl-names:
minItems: 1
- maxItems: 2
items:
- const: default
- const: state_uhs
--
2.17.1

Join cip-dev@lists.cip-project.org to automatically receive all group messages.