Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Biju <biju.das.au@gmail.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org,
	wsa+renesas@sang-engineering.com
Subject: Re: [PATCH] dt-bindings: mfd: syscon: Make ranges required for renesas,r9a08g046-lvds-cmn
Date: Tue, 02 Jun 2026 13:22:21 +0000	[thread overview]
Message-ID: <20260602132222.51C101F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260602131331.90756-1-biju.das.jz@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The conditional schema rule for `renesas,r9a08g046-lvds-cmn` is unreachable dead code due to omission from the top-level selection lists.
- [High] The schema implicitly requires child nodes and address translation for the device, but completely rejects them due to `unevaluatedProperties: false`.
- [Medium] Defining `ranges: true` globally weakens schema validation for all generic syscon devices.
--

commit a221f26520a3a09abdff9436ec38d41103c001ab
Author: Biju Das <biju.das.jz@bp.renesas.com>

dt-bindings: mfd: syscon: Make ranges required for renesas,r9a08g046-lvds-cmn

This patch adds a conditional schema rule to the syscon bindings that
requires the ranges property when the compatible string contains
renesas,r9a08g046-lvds-cmn. This ensures the LVDS common control block
on the RZ/G3L SoC correctly declares its address translation for child nodes.

> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
> index e228670880631..088df592e7ace 100644
> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
> @@ -268,6 +268,8 @@ properties:
>    resets:
>      maxItems: 1
>  
> +  ranges: true

[Severity: Medium]
Does adding this globally weaken schema validation for all generic syscon
devices? Since ranges is also defined conditionally below, could we remove
this top-level definition to avoid making the schema overly permissive for
over 100 other devices?

> +
>  required:
>    - compatible
>    - reg
> @@ -275,6 +277,18 @@ required:
>  allOf:
>    - $ref: syscon-common.yaml#
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: renesas,r9a08g046-lvds-cmn

[Severity: High]
Is this conditional rule unreachable? The schema uses a custom select block
to limit applicability:

select:
  properties:
    compatible:
      contains:
        enum:

Because renesas,r9a08g046-lvds-cmn is not added to the select enum, dtschema
might never select syscon.yaml to validate a node with this compatible string.
Does this compatible string need to be added to the top-level selection lists
to ensure validation occurs?

> +    then:
> +      properties:
> +        ranges: true
> +
> +      required:
> +        - ranges
> +
>  unevaluatedProperties: false

[Severity: High]
Since the commit message notes the device has child nodes that need a valid
ranges mapping, will setting unevaluatedProperties to false reject them?

Using ranges to map child addresses mandates the presence of child nodes as
well as #address-cells and #size-cells. However, syscon.yaml does not define
#address-cells, #size-cells, or any child node pattern properties. Will a
correctly formed device tree node with children be incorrectly rejected by
dtbs_check with unevaluated property errors?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260602131331.90756-1-biju.das.jz@bp.renesas.com?part=1

      reply	other threads:[~2026-06-02 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02 13:13 [PATCH] dt-bindings: mfd: syscon: Make ranges required for renesas,r9a08g046-lvds-cmn Biju
2026-06-02 13:22 ` sashiko-bot [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=20260602132222.51C101F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=biju.das.au@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.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