Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Muzaffer Kadir" <muzafferkadir@mainlining.org>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: pinctrl: qcom: Add MSM8952 pinctrl
Date: Fri, 04 Sep 2026 12:23:13 +0000	[thread overview]
Message-ID: <20260904122313.86F7B1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260904-msm8952-pinctrl-v3-1-110515fff513@mainlining.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Inconsistent GPIO pin count constraints and off-by-one error in pins regex.
--

commit ef5e44784233c9aad2c47ecf25b2914eec5fa936
Author: Muzaffer Kadir <muzafferkadir@mainlining.org>

dt-bindings: pinctrl: qcom: Add MSM8952 pinctrl

This commit adds device tree bindings for the TLMM pin controller
found on the Qualcomm MSM8952 platform.

> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8952-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8952-pinctrl.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8952-pinctrl.yaml
[ ... ]
> +properties:
> +  compatible:
> +    const: qcom,msm8952-pinctrl
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  gpio-reserved-ranges:
> +    minItems: 1
> +    maxItems: 61

[Severity: Low]
Should maxItems for gpio-reserved-ranges be 67 instead of 61?

The MSM8952 has 134 pins, meaning there can be up to 67 reserved ranges. The
limit of 61 appears to be a leftover from a 122-pin part like the MSM8916.
This restricts the maximum number of items incorrectly and rejects valid
device trees that need to reserve more ranges up to the correct max of 67.

> +
> +  gpio-line-names:
> +    maxItems: 134

[ ... ]

> +    properties:
> +      pins:
> +        description:
> +          List of gpio pins affected by the properties specified in this
> +          subnode.
> +        items:
> +          oneOf:
> +            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-2][0-9]|13[0-4])$"

[Severity: Low]
Does this regex incorrectly allow "gpio134" to pass DT validation?

The regex matches up to 13[0-4], which includes "gpio134" (the 135th GPIO).
However, the gpio-line-names property above is correctly restricted to 134
items (indices 0 to 133). 

Since the maximum valid GPIO index is 133, a device tree author specifying
"gpio134" in a configuration node will pass validation but fail at runtime.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260904-msm8952-pinctrl-v3-0-110515fff513@mainlining.org?part=1

  reply	other threads:[~2026-09-04 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 12:15 [PATCH v3 0/2] Add pinctrl support for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-04 12:15 ` [PATCH v3 1/2] dt-bindings: pinctrl: qcom: Add MSM8952 pinctrl Muzaffer Kadir via B4 Relay
2026-09-04 12:23   ` sashiko-bot [this message]
2026-09-04 12:15 ` [PATCH v3 2/2] pinctrl: qcom: Add MSM8952 tlmm pinctrl driver Muzaffer Kadir via B4 Relay
2026-09-04 12:30   ` 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=20260904122313.86F7B1F00A3D@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=muzafferkadir@mainlining.org \
    --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