All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Omer PALA" <palaomer100@gmail.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4] dt-bindings: iio: adc: Add dt binding to xlnx,xadc
Date: Fri, 18 Sep 2026 19:53:03 +0000	[thread overview]
Message-ID: <20260918195303.9AB8F1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918194434.9240-1-palaomer100@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: validation bypass when 'xlnx,external-mux' is omitted
--

commit 28ac615c3320e6e0d6b6715f4d23365bf3a32842
Author: Omer PALA <palaomer100@gmail.com>

dt-bindings: iio: adc: Add dt binding to xlnx,xadc

This commit converts the xilinx-xadc.txt device tree binding to YAML format
for xlnx,zynq-xadc-1.00.a, xlnx,axi-xadc-1.00.a, and
xlnx,system-management-wiz-1.3.

> diff --git a/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml b/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml
> new file mode 100644
> index 0000000000000..388511476ca8c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml
[ ... ]
> +allOf:
> +  - if:
> +      not:
> +        properties:
> +          xlnx,external-mux:
> +            enum: [single, dual]
> +    then:
> +      properties:
> +        xlnx,external-mux-channel: false

[Severity: Medium]
Will this logic correctly handle the case where xlnx,external-mux is completely
omitted?

In JSON schema, checking properties without making them required trivially
evaluates to true if the property is missing. This means if xlnx,external-mux
is omitted, the properties check passes, the not keyword inverts it to false,
and the if condition fails.

Because the condition fails, the then clause is skipped entirely, which
seems to allow device trees to specify xlnx,external-mux-channel even when
xlnx,external-mux is not present.

Does this logic bypass the validation the commit is trying to enforce?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260918194434.9240-1-palaomer100@gmail.com?part=1

  reply	other threads:[~2026-09-18 19:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 14:58 [PATCH] dt-bindings: iio: adc: Add dt binding to xlnx,xadc Omer PALA
2026-09-18 15:03 ` sashiko-bot
2026-09-18 17:48 ` [PATCH v2] " Omer PALA
2026-09-18 18:02   ` sashiko-bot
2026-09-18 18:58   ` [PATCH v3] " Omer PALA
2026-09-18 19:07     ` sashiko-bot
2026-09-18 19:44     ` [PATCH v4] " Omer PALA
2026-09-18 19:53       ` sashiko-bot [this message]
2026-09-18 20:32       ` [PATCH v5] " Omer PALA
2026-09-19  7:25         ` Krzysztof Kozlowski
2026-09-19  8:07           ` Omer PALA
2026-09-19  8:30             ` Krzysztof Kozlowski
2026-09-19  7:32   ` [PATCH v2] " Krzysztof Kozlowski

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=20260918195303.9AB8F1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=palaomer100@gmail.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.