Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "André Draszik" <andre.draszik@linaro.org>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 6/6] thermal/drivers/samsung: acpm-tmu: add .get_trend()
Date: Fri, 04 Dec 2026 10:21:54 +0000	[thread overview]
Message-ID: <sashiko-outbox-249591@kernel.org> (raw)
In-Reply-To: <20261204-b4-acpm-tmu-irq-storm-v2-6-614fe39140ce@linaro.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] thermal: samsung: acpm-tmu: misleading lock comment for enabled
  field
--

commit 9274d2c76141cde5cf418c0a8513c6b4c3588d49
Author: André Draszik <andre.draszik@linaro.org>

thermal/drivers/samsung: acpm-tmu: add .get_trend()

This commit adds a .get_trend() callback to the Samsung ACPM TMU driver
that caches the last .get_temp() reading and reports a rising or dropping
trend relative to the trip temperature.

> diff --git a/drivers/thermal/samsung/acpm-tmu.c b/drivers/thermal/samsung/acpm-tmu.c
> index ff7a07dbd58aa..5c3285f0bd200 100644
> --- a/drivers/thermal/samsung/acpm-tmu.c
> +++ b/drivers/thermal/samsung/acpm-tmu.c
> @@ -77,8 +77,9 @@ struct acpm_tmu_sensor {
>  	struct acpm_tmu_priv *priv;
>  	struct mutex lock; /* protects sensor state */
>  	enum thermal_device_mode mode;
> -	/* Last requested upper bound, protected by the thermal zone lock */
> +	/* Protected by the thermal zone lock */
>  	int high;
> +	int temp;
>  	bool enabled;
>  };

[Severity: Low]
Does the broadened comment now make it look like enabled is also protected by
the thermal zone lock?

enabled is actually protected by sensor->lock (with READ_ONCE()/WRITE_ONCE()
for the fast path in acpm_tmu_get_temp()), and acpm_tmu_control() updates it
during suspend and resume without holding tz->lock.  Moving enabled next to
mode above this comment, or adding a separating comment, would keep the
locking annotation accurate.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-b4-acpm-tmu-irq-storm-v2-0-614fe39140ce@linaro.org?part=6

      reply	other threads:[~2026-12-04 10:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 10:05 [PATCH v2 0/6] thermal/drivers/samsung: acpm-tmu: fix IRQ storm and tune GS101 DT André Draszik
2026-12-04 10:05 ` [PATCH v2 1/6] arm64: dts: exynos: gs101: raise critical trips André Draszik
2026-12-04 10:05 ` [PATCH v2 2/6] arm64: dts: exynos: gs101: tune CPU thermal zones André Draszik
2026-12-04 10:05 ` [PATCH v2 3/6] firmware: samsung: acpm: add TMU set_hysteresis op André Draszik
2026-12-04 10:05 ` [PATCH v2 4/6] thermal/drivers/samsung: acpm-tmu: OR pending bits André Draszik
2026-12-04 10:05 ` [PATCH v2 5/6] thermal/drivers/samsung: acpm-tmu: fix IRQ storm André Draszik
2026-12-04 10:23   ` sashiko-bot
2026-12-04 10:05 ` [PATCH v2 6/6] thermal/drivers/samsung: acpm-tmu: add .get_trend() André Draszik
2026-12-04 10:21   ` sashiko-bot [this message]

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=sashiko-outbox-249591@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=andre.draszik@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@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