Re:[PATCH 6.8 215/493] cpufreq: exit() callback is optional
Hi, Viresh Kumar
Do you take to heart the efforts and contributions of others to the community ?
1. I submitted this patch. You included it in your patch completely.
> > static int cpufreq_offline(unsigned int cpu)
@@ -1731,7 +1734,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
}
/* We did light-weight exit earlier, do full tear down now */
- if (cpufreq_driver->offline)
- if (cpufreq_driver->offline && cpufreq_driver->exit)
cpufreq_driver->exit(policy);
up_write(&policy->rwsem);
--
2.
You have seen the three patches I submitted to you and the main line before submitting this patch.
@@ -1670,10 +1670,13 @@ static void __cpufreq_offline(unsigned int cpu, struct cpufreq_policy *policy)
*/
if (cpufreq_driver->offline) {
cpufreq_driver->offline(policy);
- } else if (cpufreq_driver->exit) {
- cpufreq_driver->exit(policy);
- policy->freq_table = NULL;
- return;
}
- if (cpufreq_driver->exit)
- cpufreq_driver->exit(policy);
- policy->freq_table = NULL;
}
As a senior member of the kernel community, you should uphold the fairness and justice of the community.
Why do you have to rush in and take over others' patches? Isn't that selfish of you?
Your behavior disrespects others' efforts and enthusiasm, and it undermines the collaborative, harmonious, and fair atmosphere of the community.
I have tried to communicate with you several times, but you have refused. Is it because you are the maintainer of the community ? Where does your authority come from ?
thanks. Lizhe
At 2024-05-28 02:53:37, "Greg Kroah-Hartman" gregkh@linuxfoundation.org wrote:
6.8-stable review patch. If anyone has any objections, please let me know.
From: Viresh Kumar viresh.kumar@linaro.org
[ Upstream commit b8f85833c05730d631576008daaa34096bc7f3ce ]
The exit() callback is optional and shouldn't be called without checking a valid pointer first.
Also, we must clear freq_table pointer even if the exit() callback isn't present.
Signed-off-by: Viresh Kumar viresh.kumar@linaro.org Fixes: 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of CPUs") Fixes: f339f3541701 ("cpufreq: Rearrange locking in cpufreq_remove_dev()") Reported-by: Lizhe sensor1010@163.com Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Signed-off-by: Sasha Levin sashal@kernel.org
drivers/cpufreq/cpufreq.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 3c2c955fbbbd6..86f1bc7754ea6 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1670,10 +1670,13 @@ static void __cpufreq_offline(unsigned int cpu, struct cpufreq_policy *policy) */ if (cpufreq_driver->offline) { cpufreq_driver->offline(policy);
- } else if (cpufreq_driver->exit) {
cpufreq_driver->exit(policy);
policy->freq_table = NULL;
}return;
- if (cpufreq_driver->exit)
cpufreq_driver->exit(policy);
- policy->freq_table = NULL;
}
static int cpufreq_offline(unsigned int cpu) @@ -1731,7 +1734,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) }
/* We did light-weight exit earlier, do full tear down now */
- if (cpufreq_driver->offline)
if (cpufreq_driver->offline && cpufreq_driver->exit) cpufreq_driver->exit(policy);
up_write(&policy->rwsem);
-- 2.43.0
participants (1)
-
lizhe