From: Rob Herring <robh@kernel.org>
To: Tony Lindgren <tony@atomide.com>
Cc: devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Subject: Re: dt binding check error with hash and comma
Date: Fri, 16 Dec 2022 09:22:50 -0600 [thread overview]
Message-ID: <167120412788.2775435.8636155497083101478.robh@kernel.org> (raw)
In-Reply-To: <Y5xcE5Qoyf5Zg6fV@atomide.com>
On Fri, 16 Dec 2022 13:52:51 +0200, Tony Lindgren wrote:
> Hi Krzysztof & Rob,
>
> I'm getting a dt binding check error with a pinctrl-single yaml patch for
> property '#pinctrl-single,gpio-range-cells'. It seems to be caused by having
> both a hash and comma in the property:
>
> DTEX Documentation/devicetree/bindings/pinctrl/pinctrl-single.example.dts
> LINT Documentation/devicetree/bindings
> CHKDT Documentation/devicetree/bindings/processed-schema.json
> Traceback (most recent call last):
> File "/usr/bin/dt-doc-validate", line 63, in <module>
> ret |= check_doc(f)
> ^^^^^^^^^^^^
> File "/usr/bin/dt-doc-validate", line 32, in check_doc
> print(dtschema.format_error(filename, error, verbose=args.verbose), file=sys.stderr)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/site-packages/dtschema/lib.py", line 1350, in format_error
> msg += '\n' + format_error(filename, suberror, prefix=prefix+"\t", nodename=nodename, verbose=verbose)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/site-packages/dtschema/lib.py", line 1326, in format_error
> if error.linecol[0] >= 0:
> ^^^^^^^^^^^^^
> AttributeError: 'ValidationError' object has no attribute 'linecol'
> SCHEMA Documentation/devicetree/bindings/processed-schema.json
> DTC_CHK Documentation/devicetree/bindings/pinctrl/pinctrl-single.example.dtb
>
> Any ideas why this is happening?
>
> This is with dt-doc-validate 2022.11 and:
>
> $ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml
>
> With the WIP patch below.
>
> Regards,
>
> Tony
>
> 8< -------------------------
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:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml: properties:#pinctrl-single,gpio-range-cells: 'oneOf' conditional failed, one must be fixed:
'type' is a required property
hint: A vendor boolean property can use "type: boolean"
Additional properties are not allowed ('const' was unexpected)
hint: A vendor boolean property can use "type: boolean"
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml: properties:#pinctrl-single,gpio-range-cells: 'oneOf' conditional failed, one must be fixed:
'$ref' is a required property
'allOf' is a required property
hint: A vendor property needs a $ref to types.yaml
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
3 is not of type 'string'
hint: A vendor string property with exact values has an implicit type
hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
doc reference errors (make refcheckdocs):
Documentation/devicetree/bindings/arm/omap/ctrl.txt: Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt: Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/Y5xcE5Qoyf5Zg6fV@atomide.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.
prev parent reply other threads:[~2022-12-16 15:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 11:52 dt binding check error with hash and comma Tony Lindgren
2022-12-16 11:58 ` Krzysztof Kozlowski
2022-12-16 12:05 ` Tony Lindgren
2022-12-16 15:22 ` Rob Herring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=167120412788.2775435.8636155497083101478.robh@kernel.org \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=robh+dt@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox