All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, devicetree@vger.kernel.org,
	conor+dt@kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: Fix phandle-array constraints, again
Date: Fri, 08 May 2026 20:19:53 +0000	[thread overview]
Message-ID: <20260508201954.60231C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260507201749.2605365-1-robh@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `maximum` constraint for the 'Single bit index to toggle' in `qcom,smem-states` properties is incorrectly set to 32 instead of 31.
--

commit 20348129b7dc793c517f442ef59bc8d4f2293a0e
Author: Rob Herring (Arm) <robh@kernel.org>

dt-bindings: Fix phandle-array constraints, again

The unfortunately named 'phandle-array' property type is really a matrix
with phandle and fixed arg cells entries. A matrix property should have 2
levels of items constraints.

[ ... ]

> diff --git a/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml b/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml
> index b30544410d092..33746c238513d 100644
> --- a/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml
> +++ b/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml
> @@ -42,7 +42,19 @@ properties:
>      description: State bits used by the AP to signal the modem.
>      items:
>        - description: Power control
> +        items:
> +          - description: Phandle to the Shared Memory Point 2 Point device
> +              handling the communication with a remote processor
> +          - description: Single bit index to toggle in the value sent to
> +              the remote processor
> +            maximum: 32

Should this maximum be 31 instead of 32?

A valid bit index for a 32-bit value ranges from 0 to 31. Setting the maximum
to 32 permits a device tree to specify an out-of-bounds bit index, which could
lead to undefined behavior if a driver shifts by 32 on a 32-bit architecture.

This maximum of 32 is also used for the smem-states additions in the other
bindings updated in this patch.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260507201749.2605365-1-robh@kernel.org?part=1

  parent reply	other threads:[~2026-05-08 20:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 20:16 [PATCH v2] dt-bindings: Fix phandle-array constraints, again Rob Herring (Arm)
2026-05-07 21:30 ` Rob Herring (Arm)
2026-05-08 13:20   ` Rob Herring
2026-05-08 20:19 ` sashiko-bot [this message]
2026-05-19 13:27 ` Manivannan Sadhasivam
  -- strict thread matches above, loose matches on Subject: below --
2026-05-16 19:13 kernel test robot

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=20260508201954.60231C2BCB0@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-pci@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko@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.