Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Flaviu Nistor" <flaviu.nistor@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: hwmon: national,lm90: Fix channel constraints for temperature offset
Date: Mon, 24 Aug 2026 18:49:34 +0000	[thread overview]
Message-ID: <20260824184935.482AA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260824183900.8983-2-flaviu.nistor@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Unanchored regular expressions in `patternProperties` violate dt-bindings conventions by matching substrings instead of exact node names.
--

--- Patch [1]: [PATCH 1/2] dt-bindings: hwmon: national,lm90: Fix channel constraints for temperature offset ---
commit 9782538dd0bd62fc7f4323e17bb521a9d2fa819b
Author: Flaviu Nistor <flaviu.nistor@gmail.com>

dt-bindings: hwmon: national,lm90: Fix channel constraints for temperature offset

This commit limits the temperature-offset-millicelsius property to remote
channels only, as it doesn't apply to the local channel 0. It also rejects
channel 2 for devices that do not support a second remote channel.

> diff --git a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
> index 164068ba069d7..a7f82b202b861 100644
> --- a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
[ ... ]
> @@ -113,6 +113,29 @@ allOf:
>        properties:
>          ti,extended-range-enable: false
>  
> +  - patternProperties:
> +      "channel@0":

[Severity: Low]
Should this regular expression be anchored as "^channel@0$"?

Without anchors, this matches any child node containing "channel@0" as a
substring (such as "mychannel@0"), causing incorrect schema validation rules
to be applied during dt_binding_check execution.

> +        type: object
> +        properties:
> +          temperature-offset-millicelsius: false
> +
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - adi,adt7481
> +                - dallas,max6695
> +                - dallas,max6696
> +    then:
> +      patternProperties:
> +        "^channel@[0-1]$":
> +          properties:
> +            reg:
> +              enum: [0, 1]
> +        "channel@2": false

[Severity: Low]
Does this pattern also need to be anchored as "^channel@2$"?

As written, it behaves as a substring match and might inadvertently reject
node names containing it as a substring.

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

  reply	other threads:[~2026-08-24 18:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24 18:38 [PATCH 0/2] hwmon: lm90: Fix DT channel constraints and reject unsupported channel 2 Flaviu Nistor
2026-08-24 18:38 ` [PATCH 1/2] dt-bindings: hwmon: national,lm90: Fix channel constraints for temperature offset Flaviu Nistor
2026-08-24 18:49   ` sashiko-bot [this message]
2026-08-25 16:58   ` Conor Dooley
2026-08-24 18:39 ` [PATCH 2/2] hwmon: (lm90) Reject channel 2 on chips with only one remote sensor Flaviu Nistor
2026-08-24 18:50   ` 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=20260824184935.482AA1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=flaviu.nistor@gmail.com \
    --cc=linux-hwmon@vger.kernel.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