Message ID | 20230606175246.190465-9-miquel.raynal@bootlin.com |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | Prevent NAND chip unevaluated properties | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/patch-applied | success | |
robh/dt-meta-schema | fail | build log |
On Tue, 06 Jun 2023 19:52:37 +0200, Miquel Raynal wrote: > nand-ecc-mode is a generic property which may apply to any raw NAND > chip, it does not need to be listed in each controller > description. Instead, let's reference the raw NAND chip description file > which contains the property. The description contained > "additionalProperties: false" which is wrong as other properties such as > partitions might very well be added in the final .dts, and anyway needs > to be converted into "unexpectedProperties: false" to fit the property > change new requirements. > > Cc: Maxime Ripard <mripard@kernel.org> > Cc: Chen-Yu Tsai <wens@csie.org> > Cc: Jernej Skrabec <jernej.skrabec@gmail.com> > Cc: Samuel Holland <samuel@sholland.org> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > --- > .../devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 5 ++--- > 1 file changed, 2 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/allwinner,sun4i-a10-nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-9-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/allwinner,sun4i-a10-nand.yaml b/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml index e7ec0c59bca6..f9bb695e13d4 100644 --- a/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml +++ b/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml @@ -49,13 +49,12 @@ properties: patternProperties: "^nand@[a-f0-9]$": type: object + $ref: raw-nand-chip.yaml properties: reg: minimum: 0 maximum: 7 - nand-ecc-mode: true - nand-ecc-algo: const: bch @@ -75,7 +74,7 @@ patternProperties: minimum: 0 maximum: 1 - additionalProperties: false + unevaluatedProperties: false required: - compatible
nand-ecc-mode is a generic property which may apply to any raw NAND chip, it does not need to be listed in each controller description. Instead, let's reference the raw NAND chip description file which contains the property. The description contained "additionalProperties: false" which is wrong as other properties such as partitions might very well be added in the final .dts, and anyway needs to be converted into "unexpectedProperties: false" to fit the property change new requirements. Cc: Maxime Ripard <mripard@kernel.org> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Jernej Skrabec <jernej.skrabec@gmail.com> Cc: Samuel Holland <samuel@sholland.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- .../devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)