Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307563
| From | Juri Lelli <juri.lelli@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 07/19] cpufreq: assert locking when accessing cpufreq_governor_list |
| Date | 2016-01-12 16:40 +0100 |
| Message-ID | <qQ9d9-2Sx-33@gated-at.bofh.it> (permalink) |
| References | <qPOBH-5zs-9@gated-at.bofh.it> <qPOLp-5E8-19@gated-at.bofh.it> <qQ43M-7TO-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
On 12/01/16 15:31, Viresh Kumar wrote:
> On 11-01-16, 17:35, Juri Lelli wrote:
> > @@ -2025,6 +2027,7 @@ int cpufreq_register_governor(struct cpufreq_governor *governor)
> > err = -EBUSY;
> > if (!find_governor(governor->name)) {
> > err = 0;
> > + lockdep_assert_held(&cpufreq_governor_mutex);
> > list_add(&governor->governor_list, &cpufreq_governor_list);
> > }
>
> Why here? This is how the routine looks like:
>
I guess I was simply over-paranoid. We can drop this assertion.
Thanks,
- Juri
> int cpufreq_register_governor(struct cpufreq_governor *governor)
> {
> int err;
>
> if (!governor)
> return -EINVAL;
>
> if (cpufreq_disabled())
> return -ENODEV;
>
> mutex_lock(&cpufreq_governor_mutex);
>
> governor->initialized = 0;
> err = -EBUSY;
> if (!find_governor(governor->name)) {
> err = 0;
> list_add(&governor->governor_list, &cpufreq_governor_list);
> }
>
> mutex_unlock(&cpufreq_governor_mutex);
> return err;
> }
>
>
> --
> viresh
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH 07/19] cpufreq: assert locking when accessing cpufreq_governor_list Juri Lelli <juri.lelli@arm.com> - 2016-01-11 18:50 +0100
Re: [RFC PATCH 07/19] cpufreq: assert locking when accessing cpufreq_governor_list Viresh Kumar <viresh.kumar@linaro.org> - 2016-01-12 11:10 +0100
Re: [RFC PATCH 07/19] cpufreq: assert locking when accessing cpufreq_governor_list Juri Lelli <juri.lelli@arm.com> - 2016-01-12 16:40 +0100
csiph-web