From: Tim Deegan Subject: Re: [PATCH v2 1/5] x86/hpet: Pre cleanup Date: Fri, 8 Nov 2013 17:39:03 +0100 Message-ID: <20131108163903.GA12621@deinos.phlegethon.org> References: <1383838105-9775-1-git-send-email-andrew.cooper3@citrix.com> <1383838105-9775-2-git-send-email-andrew.cooper3@citrix.com> <527CC1A602000078001011B7@nat28.tlf.novell.com> <527CBED9.7060706@citrix.com> <527CDBC20200007800101298@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vep5R-0007Ug-In for xen-devel@lists.xenproject.org; Fri, 08 Nov 2013 16:39:09 +0000 Content-Disposition: inline In-Reply-To: <527CDBC20200007800101298@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Andrew Cooper , Keir Fraser , xen-devel List-Id: xen-devel@lists.xenproject.org At 11:40 +0000 on 08 Nov (1383907234), Jan Beulich wrote: > >>> On 08.11.13 at 11:37, Andrew Cooper wrote: > > On 08/11/13 09:49, Jan Beulich wrote: > >> I very much think we should get away from the habit of prefixing > >> symbols with two underscores: Such names are reserved to the > >> compiler/platform, and the standard specifically reserves names > >> starting with one underscore (and not followed by an upper case > >> letter) for use a file scope symbols. This is what I'd like to request > >> be done here. > > > > So what would you suggest? Here, all the __$foo() are designed to end > > up similar to large swathes of other Xen code, implying that the > > appropriate spinlock should be held by the caller. > > > > I am not too fussed which convention we use, so long as it is used > > consistently. > > We obviously can't switch to the single-underscore model in one > go. But there are examples of this in the tree already, and I'm > trying to stick to this unless someone tells me not to. In the end > it'll really depend on others' opinions (albeit avoiding to violate the > standard is imo sufficiently strong an argument by itself). IIRC the __ reservation is a posix thing, not a C one, so it doesn't apply to us kernel hackers. :) But actually I would prefer to avoid using underscore prefixes altogether; I think they're ugly and sometimes slightly lazy. (This is a relatively recent conversion -- I realise the shadow code is full of them!). I'd be happy with an explicit CODING_STYLE convention that said we would use them only for the trivial locked vs unlocked distinction. Cheers, Tim.