From: sashiko-bot@kernel.org
Cc: conor+dt@kernel.org, Frank.Li@kernel.org, krzk+dt@kernel.org,
dmaengine@vger.kernel.org, imx@lists.linux.dev, robh@kernel.org,
devicetree@vger.kernel.org, vkoul@kernel.org
Subject: Re: [PATCH] dt-bindings: Consolidate "sram" property definition
Date: Tue, 12 May 2026 22:18:29 +0000 [thread overview]
Message-ID: <20260512221830.35494C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260511165942.2774868-1-robh@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The global `sram-consumer.yaml` schema causes `dtbs_check` validation failures due to a namespace collision with standard `sram` child nodes.
--
commit b3fd675e204900532756fc42297dea0b1787d10f
Author: Rob Herring (Arm) <robh@kernel.org>
dt-bindings: Consolidate "sram" property definition
The "sram" property has become a de facto standard property, so create a
common schema for it and drop all the duplicated definitions.
[ ... ]
> diff --git a/Documentation/devicetree/bindings/sram/sram-consumer.yaml b/Documentation/devicetree/bindings/sram/sram-consumer.yaml
> new file mode 100644
> index 0000000000000..f00087bd2879b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sram/sram-consumer.yaml
> @@ -0,0 +1,26 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sram/sram-consumer.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: SRAM Consumers
> +
> +maintainers:
> + - Rob Herring <robh@kernel.org>
> +
> +select: true
> +
> +properties:
> + sram:
> + description:
> + Phandles to one or more reserved on-chip SRAM regions. The regions
> + should be defined as child nodes of the respective SRAM node, and
> + should be defined as per the generic bindings in,
> + Documentation/devicetree/bindings/sram/sram.yaml
> + $ref: /schemas/types.yaml#/definitions/phandle-array
Will this cause dtbs_check validation failures due to a namespace collision
with standard sram child nodes?
Because select: true makes this apply globally, it intercepts the "sram"
key for all nodes. In dt-schema, properties and child nodes share the exact
same namespace.
A child node named sram without a unit-address (which is permitted by
sram.yaml and exists in device trees like arch/powerpc/boot/dts/ebony.dts)
is represented in the YAML output as a JSON object assigned to the "sram"
key of its parent.
When dt-validate evaluates the parent node, this global schema will attempt
to validate the child node object against the phandle-array constraints,
triggering a schema validation error because an object is not an array.
Is there a way to limit the selection so it doesn't match these child
nodes?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260511165942.2774868-1-robh@kernel.org?part=1
next prev parent reply other threads:[~2026-05-12 22:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 16:59 [PATCH] dt-bindings: Consolidate "sram" property definition Rob Herring (Arm)
2026-05-11 18:55 ` Linus Walleij
2026-05-11 23:09 ` Jakub Kicinski
2026-05-12 0:46 ` Mark Brown
2026-05-12 2:57 ` Liu Ying
2026-05-12 9:15 ` Lorenzo Bianconi
2026-05-12 22:18 ` sashiko-bot [this message]
2026-05-13 8:22 ` Vinod Koul
2026-05-13 13:26 ` Dmitry Baryshkov
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=20260512221830.35494C2BCB0@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko@lists.linux.dev \
--cc=vkoul@kernel.org \
/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