From: sashiko-bot@kernel.org
To: "Matti Vaittinen" <matti.vaittinen@linux.dev>
Cc: robh@kernel.org, linux-hwmon@vger.kernel.org,
conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/7] dt-bindings: adm1275: ROHM BD12780 hot-swap controller
Date: Tue, 16 Jun 2026 06:55:30 +0000 [thread overview]
Message-ID: <20260616065531.3A6EF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <d63c4df5e9df845bc4f94b4abdcd068a23929974.1781591132.git.mazziesaccount@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Invalid use of the `items` object for the single-string compatible enum, allowing arrays of multiple arbitrary compatible strings.
--
commit 7132123aae357451c411a0cee036262cc9f62a45
Author: Matti Vaittinen <mazziesaccount@gmail.com>
dt-bindings: adm1275: ROHM BD12780 hot-swap controller
This commit adds support for the ROHM BD12780 and BD12780A hot-swap
controllers to the adm1275 device tree bindings. It introduces new
compatible strings, requiring BD12780A to use BD12780 as a fallback.
> diff --git a/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml b/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml
> index d6a7517f2a50c..bc67510ef3ab1 100644
> --- a/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml
[ ... ]
> @@ -25,19 +25,35 @@ description: |
> properties:
> compatible:
> - enum:
> - - adi,adm1075
> - - adi,adm1272
> - - adi,adm1273
> - - adi,adm1275
> - - adi,adm1276
> - - adi,adm1278
> - - adi,adm1281
> - - adi,adm1293
> - - adi,adm1294
> - - silergy,mc09c
> + oneOf:
> + - items:
> + enum:
> + - adi,adm1075
> + - adi,adm1272
> + - adi,adm1273
[Severity: Low]
Does wrapping this enum inside an items list inadvertently allow multiple
exclusive strings instead of restricting it to exactly one?
In dt-schema, applying an items object directly to a string-array property
like compatible defines the schema for all elements of the array, but does
not impose bounds on the array length. This might allow a device tree to
define a compatible property with multiple strings from this list, such as:
compatible = "adi,adm1075", "adi,adm1272";
To enforce exactly one string from the list, should the items wrapper be
removed so that the enum resides directly under oneOf?
> + - adi,adm1275
> + - adi,adm1276
> + - adi,adm1278
> + - adi,adm1281
> + - adi,adm1293
> + - adi,adm1294
> + - rohm,bd12780
> + - silergy,mc09c
> +
> +# Require BD12780 as a fall-back for BD12780A.
> + - items:
> + - const: rohm,bd12780a
> + - const: rohm,bd12780
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1781591132.git.mazziesaccount@gmail.com?part=1
next prev parent reply other threads:[~2026-06-16 6:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 6:33 [PATCH 0/7] Support ROHM BD127x0 hot-swap controllers Matti Vaittinen
2026-06-16 6:35 ` [PATCH 1/7] dt-bindings: adm1275: ROHM BD12780 hot-swap controller Matti Vaittinen
2026-06-16 6:55 ` sashiko-bot [this message]
2026-06-16 6:36 ` [PATCH 2/7] doc: Add ROHM BD12780 and BD12780A Matti Vaittinen
2026-06-16 6:52 ` sashiko-bot
2026-06-16 6:36 ` [PATCH 3/7] hwmon: adm1275: Support ROHM BD12780 Matti Vaittinen
2026-06-16 6:54 ` sashiko-bot
2026-06-16 6:37 ` [PATCH 4/7] dt-bindings: adm1275: ROHM BD12790 hot-swap controller Matti Vaittinen
2026-06-16 6:53 ` sashiko-bot
2026-06-16 6:38 ` [PATCH 5/7] doc: adm1275: Add ROHM BD12790 Matti Vaittinen
2026-06-16 6:54 ` sashiko-bot
2026-06-16 6:44 ` [PATCH 6/7] hwmon: adm1275: Support " Matti Vaittinen
2026-06-16 6:59 ` sashiko-bot
2026-06-16 6:47 ` [PATCH 7/7] hwmon: adm1275: Support module auto-loading Matti Vaittinen
2026-06-16 6:59 ` sashiko-bot
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=20260616065531.3A6EF1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=matti.vaittinen@linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox