Messages in this thread | | | Date | Fri, 3 Jan 2014 14:44:31 +0800 | From | Jane Li <> | Subject | Re: [PATCH v2] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled |
| |
On 01/03/2014 07:26 AM, Dmitry Torokhov wrote > Unlocking in different branches is not the best practice IMO, I'd > recommend doing: > > mutex_lock(&cpufreq_governor_lock); > > if (!policy->governor_enabled) > goto out_unlock; > > ... > > out_unlock: > mutex_unlock(&cpufreq_governor_lock); > > Thanks! > OK. I have pushed PATCH v3. Please review again.
Besides, I use checkpatch.pl to check this patch, and find there is warning. PATCH v3 also move cpufreq_governor_lock declaration to cpufreq.h.
WARNING: externs should be avoided in .c files #106: FILE: drivers/cpufreq/cpufreq_governor.c:25: +extern struct mutex cpufreq_governor_lock;
Thanks!
| |