Message ID | 20230606175246.190465-12-miquel.raynal@bootlin.com |
---|---|
State | Changes Requested |
Delegated to: | Miquel Raynal |
Headers | show |
Series | Prevent NAND chip unevaluated properties | expand |
On Tue, 06 Jun 2023 19:52:40 +0200, Miquel Raynal wrote: > Ensure all raw NAND chip properties are valid by referencing the > relevant schema and set unevaluatedProperties to false in the NAND chip > section to avoid spurious additions of random properties. > > Doing this in one location also saves us from dupplicating the > description of the NAND chip object. > > Cc: Masahiro Yamada <yamada.masahiro@socionext.com> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > --- > Documentation/devicetree/bindings/mtd/denali,nand.yaml | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: ./Documentation/devicetree/bindings/mtd/denali,nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/denali,nand.example.dtb: nand-controller@ff900000: nand@0: False schema does not allow {'reg': [[0]]} From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/denali,nand.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/denali,nand.example.dtb: nand-controller@ff900000: nand@0: Unevaluated properties are not allowed ('reg' was unexpected) From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/denali,nand.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-12-miquel.raynal@bootlin.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
diff --git a/Documentation/devicetree/bindings/mtd/denali,nand.yaml b/Documentation/devicetree/bindings/mtd/denali,nand.yaml index 0be83ad42970..81f95538d415 100644 --- a/Documentation/devicetree/bindings/mtd/denali,nand.yaml +++ b/Documentation/devicetree/bindings/mtd/denali,nand.yaml @@ -63,6 +63,12 @@ properties: minItems: 1 maxItems: 2 +patternProperties: + "^nand@[a-f0-9]$": + type: object + $ref: raw-nand-chip.yaml + unevaluatedProperties: false + allOf: - $ref: nand-controller.yaml @@ -74,7 +80,6 @@ allOf: then: patternProperties: "^nand@[a-f0-9]$": - type: object properties: nand-ecc-strength: enum: @@ -92,7 +97,6 @@ allOf: then: patternProperties: "^nand@[a-f0-9]$": - type: object properties: nand-ecc-strength: enum: @@ -111,7 +115,6 @@ allOf: then: patternProperties: "^nand@[a-f0-9]$": - type: object properties: nand-ecc-strength: enum:
Ensure all raw NAND chip properties are valid by referencing the relevant schema and set unevaluatedProperties to false in the NAND chip section to avoid spurious additions of random properties. Doing this in one location also saves us from dupplicating the description of the NAND chip object. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- Documentation/devicetree/bindings/mtd/denali,nand.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)