Message ID | 20201005183830.486085-1-robh@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | dt-bindings: additional/unevaluatedProperties clean-ups | expand |
On Mon, Oct 05, 2020 at 01:38:27PM -0500, Rob Herring wrote: > This doesn't yet do anything in the tools, but make it explicit so we can > check either 'unevaluatedProperties' or 'additionalProperties' is present > in schemas. Acked-by: Mark Brown <broonie@kernel.org>
On Mon, Oct 05, 2020 at 01:38:27PM -0500, Rob Herring wrote: > This doesn't yet do anything in the tools, but make it explicit so we can > check either 'unevaluatedProperties' or 'additionalProperties' is present > in schemas. > > 'unevaluatedProperties' is appropriate when including another schema (via > '$ref') and all possible properties and/or child nodes are not > explicitly listed in the schema with the '$ref'. > > This is in preparation to add a meta-schema to check for missing > 'unevaluatedProperties' or 'additionalProperties'. This has been a > constant source of review issues. > > Signed-off-by: Rob Herring <robh@kernel.org> I trust you, so for I2C: Acked-by: Wolfram Sang <wsa@kernel.org>
On Mon, Oct 05, 2020 at 01:38:27PM -0500, Rob Herring wrote: > This doesn't yet do anything in the tools, but make it explicit so we can > check either 'unevaluatedProperties' or 'additionalProperties' is present > in schemas. > > 'unevaluatedProperties' is appropriate when including another schema (via > '$ref') and all possible properties and/or child nodes are not > explicitly listed in the schema with the '$ref'. > > This is in preparation to add a meta-schema to check for missing > 'unevaluatedProperties' or 'additionalProperties'. This has been a > constant source of review issues. > > Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Best regards, Krzysztof
On 05-10-20, 13:38, Rob Herring wrote: > This doesn't yet do anything in the tools, but make it explicit so we can > check either 'unevaluatedProperties' or 'additionalProperties' is present > in schemas. > > 'unevaluatedProperties' is appropriate when including another schema (via > '$ref') and all possible properties and/or child nodes are not > explicitly listed in the schema with the '$ref'. > > This is in preparation to add a meta-schema to check for missing > 'unevaluatedProperties' or 'additionalProperties'. This has been a > constant source of review issues. Acked-By: Vinod Koul <vkoul@kernel.org>
Hi Rob, On Mon, Oct 5, 2020 at 8:39 PM Rob Herring <robh@kernel.org> wrote: > This doesn't yet do anything in the tools, but make it explicit so we can > check either 'unevaluatedProperties' or 'additionalProperties' is present > in schemas. > > 'unevaluatedProperties' is appropriate when including another schema (via > '$ref') and all possible properties and/or child nodes are not > explicitly listed in the schema with the '$ref'. > > This is in preparation to add a meta-schema to check for missing > 'unevaluatedProperties' or 'additionalProperties'. This has been a > constant source of review issues. > > Signed-off-by: Rob Herring <robh@kernel.org> Thanks for your patch! > Documentation/devicetree/bindings/bus/renesas,bsc.yaml | 2 ++ > .../bindings/memory-controllers/renesas,rpc-if.yaml | 2 ++ > Documentation/devicetree/bindings/net/renesas,ether.yaml | 2 ++ > Documentation/devicetree/bindings/serial/renesas,hscif.yaml | 2 ++ > Documentation/devicetree/bindings/serial/renesas,sci.yaml | 2 ++ > Documentation/devicetree/bindings/serial/renesas,scif.yaml | 2 ++ > Documentation/devicetree/bindings/serial/renesas,scifa.yaml | 2 ++ > Documentation/devicetree/bindings/serial/renesas,scifb.yaml | 2 ++ > Documentation/devicetree/bindings/spi/renesas,hspi.yaml | 2 ++ > Documentation/devicetree/bindings/spi/renesas,rspi.yaml | 2 ++ > Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml | 2 ++ Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- a/Documentation/devicetree/bindings/net/renesas,ether.yaml > +++ b/Documentation/devicetree/bindings/net/renesas,ether.yaml > @@ -85,6 +85,8 @@ required: > - clocks > - pinctrl-0 > > +unevaluatedProperties: false This one has received an "additionalProperties: false" in commit 41506bff84f1563e ("dt-bindings: net: renesas, ether: Improve schema validation") in net-next, which you probably want to remove. > + > examples: > # Lager board > - | Gr{oetje,eeting}s, Geert
On 05/10/2020 19:38, Rob Herring wrote: > The default behavior for json-schema is any unknown property is allowed. > T > > hat is generally not the behavior we want for DT. In order to disallow > extra properties, schemas need to define 'additionalProperties: false' > typically. Ideally, we'd just add that automatically with the tools, but > there are some exceptions so only making things explicit everywhere > really works. Missing 'additionalProperties' or 'unevaluatedProperties' > has been a constant source of review comments, so a meta-schema check is > really needed here. > > Documentation/devicetree/bindings/nvmem/nvmem.yaml | 2 ++ > .../devicetree/bindings/nvmem/qcom,qfprom.yaml | 2 ++ for nvmem parts, Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> thanks, --srini
On Mon, 5 Oct 2020 at 20:38, Rob Herring <robh@kernel.org> wrote: > > This doesn't yet do anything in the tools, but make it explicit so we can > check either 'unevaluatedProperties' or 'additionalProperties' is present > in schemas. > > 'unevaluatedProperties' is appropriate when including another schema (via > '$ref') and all possible properties and/or child nodes are not > explicitly listed in the schema with the '$ref'. > > This is in preparation to add a meta-schema to check for missing > 'unevaluatedProperties' or 'additionalProperties'. This has been a > constant source of review issues. > > Signed-off-by: Rob Herring <robh@kernel.org> > --- [...] > .../devicetree/bindings/mmc/amlogic,meson-mx-sdhc.yaml | 2 ++ > Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml | 2 ++ > Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml | 2 ++ > Documentation/devicetree/bindings/mmc/owl-mmc.yaml | 2 ++ > Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 2 ++ > Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml | 2 ++ > .../devicetree/bindings/mmc/socionext,uniphier-sd.yaml | 2 ++ > Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.yaml | 2 ++ For mmc: Acked-by: Ulf Hansson <ulf.hansson@linaro.org> [...] Kind regards Uffe
On Mon, Oct 05, 2020 at 01:38:27PM -0500, Rob Herring wrote: > This doesn't yet do anything in the tools, but make it explicit so we can > check either 'unevaluatedProperties' or 'additionalProperties' is present > in schemas. > > 'unevaluatedProperties' is appropriate when including another schema (via > '$ref') and all possible properties and/or child nodes are not > explicitly listed in the schema with the '$ref'. > > This is in preparation to add a meta-schema to check for missing > 'unevaluatedProperties' or 'additionalProperties'. This has been a > constant source of review issues. > > Signed-off-by: Rob Herring <robh@kernel.org> For input: Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Hi, On 05/10/2020 13:38:27-0500, Rob Herring wrote: > diff --git a/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml b/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml > index bc2c7e53a28e..60e93e86ad9d 100644 > --- a/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml > +++ b/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml > @@ -68,6 +68,8 @@ required: > - clocks > - clock-names > > +unevaluatedProperties: false This one could be additionalProperties: false after adding start-year to the properties > + > examples: > - | > #include <dt-bindings/clock/jz4740-cgu.h> > diff --git a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml > index 76bbf8b7555b..d51b236939bf 100644 > --- a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml > +++ b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml > @@ -74,6 +74,8 @@ allOf: > items: > - const: rtc > > +unevaluatedProperties: false This one can be simply additionalProperties: false