From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roedel, Joerg" Date: Thu, 27 May 2010 11:11:36 +0000 Subject: Re: [PATCH 6/17] arch/x86/kernel: Add missing spin_unlock Message-Id: <20100527111136.GV3266@amd.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Julia Lawall Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" On Wed, May 26, 2010 at 11:55:59AM -0400, Julia Lawall wrote: > The semantic match that finds this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ > expression E1; > @@ > > * spin_lock(E1,...); > <+... when != E1 > if (...) { > ... when != E1 > * return ...; > } > ...+> > * spin_unlock(E1,...); > // Btw, I think it would be great to have a collection of these semantic match scripts in the kernel repository together with a build target to run these scripts over the kernel sources (like the cscope target). Opinions? Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757359Ab0E0LLs (ORCPT ); Thu, 27 May 2010 07:11:48 -0400 Received: from tx2ehsobe004.messaging.microsoft.com ([65.55.88.14]:23255 "EHLO TX2EHSOBE007.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753608Ab0E0LLq (ORCPT ); Thu, 27 May 2010 07:11:46 -0400 X-SpamScore: -13 X-BigFish: VPS-13(zz1432P98dNab9bhzz1202hzz6d525hz32i2a8h87h43h61h) X-Spam-TCS-SCL: 0:0 X-FB-DOMAIN-IP-MATCH: fail X-WSS-ID: 0L32SFA-02-38W-02 X-M-MSG: Date: Thu, 27 May 2010 13:11:36 +0200 From: "Roedel, Joerg" To: Julia Lawall CC: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" Subject: Re: [PATCH 6/17] arch/x86/kernel: Add missing spin_unlock Message-ID: <20100527111136.GV3266@amd.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Organization: Advanced Micro Devices =?iso-8859-1?Q?GmbH?= =?iso-8859-1?Q?=2C_Karl-Hammerschmidt-Str=2E_34=2C_85609_Dornach_bei_M=FC?= =?iso-8859-1?Q?nchen=2C_Gesch=E4ftsf=FChrer=3A_Thomas_M=2E_McCoy=2C_Giuli?= =?iso-8859-1?Q?ano_Meroni=2C_Andrew_Bowd=2C_Sitz=3A_Dornach=2C_Gemeinde_A?= =?iso-8859-1?Q?schheim=2C_Landkreis_M=FCnchen=2C_Registergericht_M=FCnche?= =?iso-8859-1?Q?n=2C?= HRB Nr. 43632 User-Agent: Mutt/1.5.20 (2009-06-14) X-Reverse-DNS: unknown Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2010 at 11:55:59AM -0400, Julia Lawall wrote: > The semantic match that finds this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ > expression E1; > @@ > > * spin_lock(E1,...); > <+... when != E1 > if (...) { > ... when != E1 > * return ...; > } > ...+> > * spin_unlock(E1,...); > // Btw, I think it would be great to have a collection of these semantic match scripts in the kernel repository together with a build target to run these scripts over the kernel sources (like the cscope target). Opinions? Joerg