From: sashiko-bot@kernel.org
To: "Michal Piekos" <michal.piekos@mmpsystems.pl>
Cc: krzk+dt@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, robh@kernel.org,
linux-sunxi@lists.linux.dev
Subject: Re: [PATCH v2 1/3] dt-bindings: iio: adc: Add GPADC for Allwinner A523
Date: Thu, 14 May 2026 02:23:31 +0000 [thread overview]
Message-ID: <20260514022332.1E20DC19425@smtp.kernel.org> (raw)
In-Reply-To: <20260513-sunxi-a523-gpadc-v2-1-d5efde151dac@mmpsystems.pl>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Schema Conditional Logic Error: `if` block will silently fail to match A523 compatible string
--
commit f1e37c6efc76bc9bd352a9e8462984a80a03b87c
Author: Michal Piekos <michal.piekos@mmpsystems.pl>
dt-bindings: iio: adc: Add GPADC for Allwinner A523
This commit adds support for the GPADC on the Allwinner A523. It updates
the schema to allow two clocks for this new compatible string while
restricting previous generations to one clock.
> diff --git a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
> index da605a051b949..6467800d30e27 100644
> --- a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml
[ ... ]
> @@ -40,6 +46,30 @@ properties:
> resets:
> maxItems: 1
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + enum:
> + - allwinner,sun55i-a523-gpadc
Will this condition successfully match the A523 compatible string?
In dt-schema, the compatible property is parsed and evaluated as an array of
strings. By using enum directly without a contains: keyword, this condition
expects the property to be exactly a string.
Under JSON schema rules, this condition will evaluate to false because an
array cannot equal a string.
> + then:
[ ... ]
> + else:
> + properties:
> + clocks:
> + maxItems: 1
> + clock-names: false
Does this result in valid A523 device tree nodes being incorrectly rejected?
Since the if block silently fails to match, the schema will fall through to
this else block, enforcing maxItems: 1 for clocks and rejecting clock-names.
This would erroneously reject A523 configurations that correctly provide the
two required clocks.
Could the condition be updated to use contains: enum: or contains: const: to
properly match the compatible array elements?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260513-sunxi-a523-gpadc-v2-0-d5efde151dac@mmpsystems.pl?part=1
next prev parent reply other threads:[~2026-05-14 2:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 4:59 [PATCH v2 0/3] Add GPADC support for A523 Michal Piekos
2026-05-13 4:59 ` [PATCH v2 1/3] dt-bindings: iio: adc: Add GPADC for Allwinner A523 Michal Piekos
2026-05-13 19:15 ` Conor Dooley
2026-05-14 2:23 ` sashiko-bot [this message]
2026-05-13 4:59 ` [PATCH v2 2/3] iio: adc: sun20i-gpadc: add A523 gpadc support Michal Piekos
2026-05-13 11:44 ` Sanjay Chitroda
2026-05-13 11:53 ` Andre Przywara
2026-05-13 16:16 ` Jonathan Cameron
2026-05-13 21:34 ` Andre Przywara
2026-05-13 20:12 ` Andy Shevchenko
2026-05-13 21:19 ` Andre Przywara
2026-05-13 21:34 ` Andy Shevchenko
2026-05-13 20:10 ` Andy Shevchenko
2026-05-14 2:29 ` sashiko-bot
2026-05-13 4:59 ` [PATCH v2 3/3] arm64: dts: allwinner: a523: add gpadc node Michal Piekos
2026-05-14 2:42 ` 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=20260514022332.1E20DC19425@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=michal.piekos@mmpsystems.pl \
--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