From: "Zhang, Rui" <rui.zhang@intel.com>
To: "rafael@kernel.org" <rafael@kernel.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"amitk@kernel.org" <amitk@kernel.org>
Subject: Re: [PATCH v2 2/3] thermal/core: Remove unneeded ida_destroy()
Date: Tue, 24 Jan 2023 06:38:17 +0000 [thread overview]
Message-ID: <d1eaa5606177087682d822c7d7b35c1079ea2e9a.camel@intel.com> (raw)
In-Reply-To: <20230123152756.4031574-3-daniel.lezcano@linaro.org>
On Mon, 2023-01-23 at 16:27 +0100, Daniel Lezcano wrote:
> As per documentation for the ida_destroy() function: "If the IDA is
> already empty, there is no need to call this function."
>
> The thermal framework is in the init sequence, so the ida was not yet
> used and consequently it is empty in case of error.
>
> There is no need to call ida_destroy(), let's remove the calls.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
thanks,
rui
> ---
> drivers/thermal/thermal_core.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/thermal/thermal_core.c
> b/drivers/thermal/thermal_core.c
> index fddafcee5e6f..fad0c4a07d16 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -1624,8 +1624,6 @@ static int __init thermal_init(void)
> unregister_netlink:
> thermal_netlink_exit();
> error:
> - ida_destroy(&thermal_tz_ida);
> - ida_destroy(&thermal_cdev_ida);
> mutex_destroy(&thermal_list_lock);
> mutex_destroy(&thermal_governor_lock);
> return result;
next prev parent reply other threads:[~2023-01-24 6:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 15:27 [PATCH v2 0/3] Misc thermal cleanup and fixes Daniel Lezcano
2023-01-23 15:27 ` [PATCH v2 1/3] thermal/core: Fix unregistering netlink at thermal init time Daniel Lezcano
2023-01-24 6:37 ` Zhang, Rui
2023-01-23 15:27 ` [PATCH v2 2/3] thermal/core: Remove unneeded ida_destroy() Daniel Lezcano
2023-01-24 6:38 ` Zhang, Rui [this message]
2023-01-23 15:27 ` [PATCH v2 3/3] thermal/core: Move the thermal trip code to a dedicated file Daniel Lezcano
2023-01-24 6:38 ` Zhang, Rui
2023-01-25 11:15 ` [PATCH v2 0/3] Misc thermal cleanup and fixes Daniel Lezcano
2023-01-25 14:03 ` Rafael J. Wysocki
2023-01-25 15:44 ` Rafael J. Wysocki
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=d1eaa5606177087682d822c7d7b35c1079ea2e9a.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
/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®