Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967364AbXEICDx (ORCPT ); Tue, 8 May 2007 22:03:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S966416AbXEICDq (ORCPT ); Tue, 8 May 2007 22:03:46 -0400 Received: from rgminet01.oracle.com ([148.87.113.118]:27992 "EHLO rgminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966151AbXEICDp (ORCPT ); Tue, 8 May 2007 22:03:45 -0400 Date: Tue, 8 May 2007 19:08:00 -0700 From: Randy Dunlap To: David Rientjes Cc: Satyam Sharma , Andrew Morton , Paul Sokolovsky , linux-kernel@vger.kernel.org, jeremy@goop.org Subject: Re: [PATCH] doc: volatile considered evil Message-Id: <20070508190800.1334b968.randy.dunlap@oracle.com> In-Reply-To: References: <516386418.20070501080839@gmail.com> <20070430235642.e576e917.akpm@linux-foundation.org> <20070508121404.17bd97a6.randy.dunlap@oracle.com> <20070508163452.8b71f682.randy.dunlap@oracle.com> Organization: Oracle Linux Eng. X-Mailer: Sylpheed 2.3.1 (GTK+ 2.8.10; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Whitelist: TRUE X-Whitelist: TRUE X-Brightmail-Tracker: AAAAAQAAAAI= Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1826 Lines: 51 On Tue, 8 May 2007 17:06:23 -0700 (PDT) David Rientjes wrote: > On Tue, 8 May 2007, Randy Dunlap wrote: > > > From: Randy Dunlap > > > > Add information on the problems with the C-language "volatile" keyword > > and why it should not be used (most of the time). > > > > Signed-off-by: Randy Dunlap > > --- > > Documentation/volatile-usage.txt | 129 +++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 129 insertions(+) > > > > --- /dev/null > > +++ linux-2.6.21-git10/Documentation/volatile-usage.txt > > @@ -0,0 +1,129 @@ > > +***** "volatile" considered useless and evil: Just Say NO! ***** > > + > > +Do not use the C-language "volatile" keyword > > +(extracted from lkml emails from Linus) > > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > + > > Again, please change this sweeping introduction to explicitly state that > Linus' emails were a criticism of using 'volatile' for objects (he refers > to them as "data structures") and can be appropriate for asm constructs. You haven't replied to my other emails... "volatile" used on a gcc asm extension is different, granted. It's not even a C-language "volatile" keyword AFAICT, so it doesn't apply in this context. Anyway, how is this slightly modified title? +***** "volatile" considered useless and evil: Just Say NO! ***** + +Do not use the C-language "volatile" keyword on kernel data +(extracted from lkml emails from Linus) --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/