From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCHv2] dt-bindings: mtd: convert IBM NDFC binding to YAML
Date: Wed, 23 Sep 2026 19:32:25 +0000 [thread overview]
Message-ID: <20260923193226.1B19D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923192528.52330-1-rosenp@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] dt-bindings: mtd: incorrectly anchored regex in patternProperties
- [Medium] dt-bindings: mtd: schema validation bypassed for nand node
--
commit 56ea8b4c720a5df58f5f626346eba38c6d9ee900
Author: Rosen Penev <rosenp@gmail.com>
dt-bindings: mtd: convert IBM NDFC binding to YAML
The NDFC NAND flash controller was only described in a legacy text file,
so dtbs_check reported a failure to match any schema with the ibm,ndfc
compatible. Convert the binding to the YAML format so those nodes match
the generic nand-controller-legacy schema.
> diff --git a/Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml b/Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml
> new file mode 100644
> index 0000000000000..51ba0bd1d329d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml
[ ... ]
> + nand:
> + type: object
> + description: NAND chip attached to the controller.
> +
> + properties:
> + "#address-cells":
> + const: 1
> + "#size-cells":
> + const: 1
> +
> + patternProperties:
> + "(^partition)?@[0-9a-f]+$":
^^^^^^^^^^^^^^^^^^^^^^^^^^
[Severity: Medium]
Does this regex incorrectly match any node ending with a unit address?
Because the start anchor is inside an optional group, the unanchored
@[0-9a-f]+$ allows it to match any node name ending in @<hex> (for example,
chip@0). This incorrectly applies the deprecated partition schema and its
unevaluatedProperties: false constraint to unrelated subnodes, breaking
schema validation for any device tree containing a node named
<anything>@<hex> under the nand node.
> + $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node
> + deprecated: true
> + unevaluatedProperties: false
> +
> + additionalProperties: true
^^^^
[Severity: Medium]
Does setting additionalProperties to true on the nand subnode bypass schema
validation?
This explicitly disables strict schema validation for the nand subnode,
rendering its contents largely unvalidated. It allows arbitrary,
undocumented, or misspelled properties to pass validation silently, which
defeats the purpose of the YAML schema conversion for this node.
Should this node use additionalProperties: false or
unevaluatedProperties: false and explicitly define or reference the required
standard NAND properties?
> +
> +required:
> + - compatible
> + - reg
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923192528.52330-1-rosenp@gmail.com?part=1
prev parent reply other threads:[~2026-09-23 19:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 19:25 [PATCHv2] dt-bindings: mtd: convert IBM NDFC binding to YAML Rosen Penev
2026-09-23 19:32 ` 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=20260923193226.1B19D1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rosenp@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox