All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Quchaosheng <quchaosheng000406@163.com>
Cc: conor+dt@kernel.org, lee@kernel.org, robh@kernel.org,
	devicetree@vger.kernel.org, mfd@lists.linux.dev
Subject: Re: [PATCH] dt-bindings: mfd: rockchip,rk805: Convert pinctrl to DT schema
Date: Wed, 23 Sep 2026 07:53:34 +0000	[thread overview]
Message-ID: <20260923075334.8DE071F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923074337.575122-1-quchaosheng000406@163.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: schema validation bypass in pinmux node
--

commit 3e9f0dec3f740f3763a3ebb688af0f850b47bc2f
Author: Quchaosheng <quchaosheng000406@163.com>

    dt-bindings: mfd: rockchip,rk805: Convert pinctrl to DT schema
    
    pinctrl-rk805.txt describes the pinmux controller that is part of the
    Rockchip RK805 PMIC. The PMIC itself is already described by
    rockchip,rk805.yaml, so the pinmux part belongs there as well: the
    pinctrl node is a child of the PMIC node, not a separate device.

    Link: https://sashiko.dev/#/patchset/20260923034245.396417-1-quchaosheng000406@163.com?part=1
    Link: https://sashiko.dev/#/patchset/20260923062746.516666-1-quchaosheng000406@163.com?part=1

> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
> index da2391530c16c..aafc80212c485 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
> @@ -77,6 +77,21 @@ properties:
>      description:
>        The input supply for LDO_REG3.
>  
> +  # pinctrl-bindings.txt allows the pin configuration nodes to be grandchildren
> +  # of the pin controller, and the text binding this replaces used that layout:
> +  # a "pinmux" node holding the nodes that carry "pins". The driver reaches both
> +  # layouts, because pinconf_generic_dt_node_to_map() parses the referenced node
> +  # and then walks its children.
> +  pinmux:
> +    type: object
> +    additionalProperties: false
> +    patternProperties:
> +      '^.+$':
> +        if:
> +          type: object
> +        then:
> +          $ref: '#/$defs/rk805-pin-config'

[Severity: Medium]
Does this catch-all regex bypass schema validation for all non-object
properties within the grouping node?

The pinmux grouping node in the schema attempts to reject invalid properties
using additionalProperties: false, but its patternProperties regex '^.+$'
combined with if: type: object without an else: false clause evaluates to true
for all non-object properties.

This defeats the strictness of the schema, allowing any arbitrary misspelled or
invalid non-object property (like typo = <1>;) to pass validation silently.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260923074337.575122-1-quchaosheng000406@163.com?part=1

      reply	other threads:[~2026-09-23  7:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23  7:43 [PATCH] dt-bindings: mfd: rockchip,rk805: Convert pinctrl to DT schema Quchaosheng
2026-09-23  7:43 ` Quchaosheng
2026-09-23  7:53 ` 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=20260923075334.8DE071F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=quchaosheng000406@163.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.