public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Maharaja Kennadyrajan" <maharaja.kennadyrajan@oss.qualcomm.com>,
	<ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>,
	"Aishwarya R" <aishwarya.r@oss.qualcomm.com>
Subject: Re: [PATCH ath-next v3] wifi: ath12k: add basic hwmon temperature reporting
Date: Mon, 23 Feb 2026 11:05:08 +0100	[thread overview]
Message-ID: <DGM9946HTER7.2HAN0CPP3R2ZZ@gmail.com> (raw)
In-Reply-To: <20260223060238.7038-1-maharaja.kennadyrajan@oss.qualcomm.com>

On Mon Feb 23, 2026 at 7:02 AM CET, Maharaja Kennadyrajan wrote:
[...]
> +static ssize_t ath12k_thermal_temp_show(struct device *dev,
> +					struct device_attribute *attr,
> +					char *buf)
> +{
> +	struct ath12k *ar = dev_get_drvdata(dev);
> +	unsigned long time_left;
> +	int ret, temperature;
> +
> +	guard(wiphy)(ath12k_ar_to_hw(ar)->wiphy);
> +	guard(mutex)(&ar->thermal.lock);

Hello,

Is this mutex really needed ? It is used in conjuction with the wiphy_lock but
it's never used elsewhere. So even though there can be multiple ar for a single
wiphy, there is no code path that that would lock this ar->thermal.lock without
locking first the wiphy. And the wiphy lock already protect for reconfiguration
and recovery right ?

> +
> +	if (ar->ah->state != ATH12K_HW_STATE_ON)
> +		return -ENETDOWN;
> +
> +	reinit_completion(&ar->thermal.wmi_sync);
> +	ret = ath12k_wmi_send_pdev_temperature_cmd(ar);
> +	if (ret) {
> +		ath12k_warn(ar->ab, "failed to read temperature %d\n", ret);
> +		return ret;
> +	}

  reply	other threads:[~2026-02-23 10:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23  6:02 [PATCH ath-next v3] wifi: ath12k: add basic hwmon temperature reporting Maharaja Kennadyrajan
2026-02-23 10:05 ` Nicolas Escande [this message]
2026-02-23 11:32   ` Maharaja Kennadyrajan

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=DGM9946HTER7.2HAN0CPP3R2ZZ@gmail.com \
    --to=nico.escande@gmail.com \
    --cc=aishwarya.r@oss.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=maharaja.kennadyrajan@oss.qualcomm.com \
    /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