* [PATCH] cpufreq: fix typo when cpufreq device remove
@ 2022-05-06 17:08 Schspa Shi
2022-05-09 3:36 ` Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Schspa Shi @ 2022-05-06 17:08 UTC (permalink / raw)
To: rafael, viresh.kumar; +Cc: linux-pm, linux-kernel, Schspa Shi
This should check cpufreq_driver->exit pointer before call this function
Fixes: 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of
CPUs")
Signed-off-by: Schspa Shi <schspa@gmail.com>
---
drivers/cpufreq/cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 43dfaa8124e2..0f59c8ec2b39 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1661,7 +1661,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
if (cpumask_empty(policy->real_cpus)) {
/* We did light-weight exit earlier, do full tear down now */
- if (cpufreq_driver->offline)
+ if (cpufreq_driver->exit)
cpufreq_driver->exit(policy);
cpufreq_policy_free(policy);
--
2.24.3 (Apple Git-128)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cpufreq: fix typo when cpufreq device remove
2022-05-06 17:08 [PATCH] cpufreq: fix typo when cpufreq device remove Schspa Shi
@ 2022-05-09 3:36 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2022-05-09 3:36 UTC (permalink / raw)
To: Schspa Shi; +Cc: rafael, linux-pm, linux-kernel
On 07-05-22, 01:08, Schspa Shi wrote:
> This should check cpufreq_driver->exit pointer before call this function
>
> Fixes: 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of
> CPUs")
>
> Signed-off-by: Schspa Shi <schspa@gmail.com>
> ---
> drivers/cpufreq/cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 43dfaa8124e2..0f59c8ec2b39 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1661,7 +1661,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
>
> if (cpumask_empty(policy->real_cpus)) {
> /* We did light-weight exit earlier, do full tear down now */
> - if (cpufreq_driver->offline)
> + if (cpufreq_driver->exit)
> cpufreq_driver->exit(policy);
>
> cpufreq_policy_free(policy);
NAK.
The code is doing fine and there is a comment above it on why it is
doing it this way.
--
viresh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-09 3:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-06 17:08 [PATCH] cpufreq: fix typo when cpufreq device remove Schspa Shi
2022-05-09 3:36 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox