From: Dominik Brodowski Subject: Re: [PATCH 2.6.12-rc5] policy->lock in cpufreq_add_dev Date: Sun, 5 Jun 2005 19:11:00 +0200 Message-ID: <20050605171100.GD12338@dominikbrodowski.de> References: <429DE8E8.5030904@stud.feec.vutbr.cz> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <429DE8E8.5030904@stud.feec.vutbr.cz> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cpufreq-bounces@lists.linux.org.uk Errors-To: cpufreq-bounces+glkc-cpufreq=m.gmane.org@lists.linux.org.uk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michal Schmidt Cc: cpufreq@lists.linux.org.uk, davej@codemonkey.org.uk On Wed, Jun 01, 2005 at 06:57:12PM +0200, Michal Schmidt wrote: > Hello, > I think that it's not necessary to take the policy->lock in cpufreq_add_dev. > Am I missing something? What is the lock supposed to protect from? Well, indeed it is not necessary to take the policy->lock, although it doesn't do any harm AFAICS. I added it to make sure that _all_ accesses to the data is protected by the lock, how serialized they may ever be.. Thanks, Dominik PS: Always add Signed-off-by lines to your patches, please, as per Documentation/SubmittingPatches