From: "Wysocki, Rafael J" <rafael.j.wysocki@intel.com>
To: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>,
<miriam.rachel.korenblit@intel.com>, <kvalo@kernel.org>,
<daniel.lezcano@linaro.org>, <johannes.berg@intel.com>,
<dmantipov@yandex.ru>
Cc: <linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] iwlwifi: mvm: adding check if the thermal firmware is running
Date: Wed, 5 Jun 2024 21:54:53 +0200 [thread overview]
Message-ID: <621eb61c-87e1-417f-ad9f-f14d858ec8aa@intel.com> (raw)
In-Reply-To: <20240605195129.89353-1-trintaeoitogc@gmail.com>
On 6/5/2024 9:51 PM, Guilherme Giacomo Simoes wrote:
> In the dmesg is showing the message "failed to read out thermal zone"
> as if the temperature read is failed by don't find the thermal zone.
>
> After researching and debugging, I see that this specific error is
> occurrenced because the thermal try read the temperature when is started,
> but the firmware is not running yet.
>
> For more legibiliti i change the tt.c for return EAGAIN when this was occurrence.
> After this change, in my computer I compile and install kernel in /boot
> and in my dmesg the message "failed to read out thermal zone" is not show
> any more.
>
> I would like to thanks for Rafael Wysocki <refael.j.wysocki@intel.com> ,
> Kalle Valo <kvalo@kernel.org> and Johannes Berg <johannes@sipsolutions.net>
> for your suggestions in my previous patch.
>
> Signed-off-by: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
> ---
> drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
> index 8083c4b2ab6b..9aa9e3be39b8 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
> @@ -620,8 +620,14 @@ static int iwl_mvm_tzone_get_temp(struct thermal_zone_device *device,
>
> mutex_lock(&mvm->mutex);
>
> - if (!iwl_mvm_firmware_running(mvm) ||
> - mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR) {
> + int res = iwl_mvm_firmware_running(mvm);
Why do you need the res variable at all? You can just call the function
directly in the if () statement.
> +
> + if (!res) {
> + ret = -EAGAIN;
> + goto out;
> + }
> +
> + if (mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR) {
> ret = -ENODATA;
> goto out;
> }
next prev parent reply other threads:[~2024-06-05 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 19:51 Guilherme Giacomo Simoes
2024-06-05 19:54 ` Wysocki, Rafael J [this message]
2024-06-05 20:02 ` Guilherme Giácomo Simões
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=621eb61c-87e1-417f-ad9f-f14d858ec8aa@intel.com \
--to=rafael.j.wysocki@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=dmantipov@yandex.ru \
--cc=johannes.berg@intel.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=trintaeoitogc@gmail.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
all inboxes | Powered by JetHome®