From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753388AbYI2PFu (ORCPT ); Mon, 29 Sep 2008 11:05:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751478AbYI2PFo (ORCPT ); Mon, 29 Sep 2008 11:05:44 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.124]:46056 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751386AbYI2PFn (ORCPT ); Mon, 29 Sep 2008 11:05:43 -0400 Date: Mon, 29 Sep 2008 11:05:39 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Ingo Molnar cc: LKML , Thomas Gleixner , Peter Zijlstra , Andrew Morton , prasad@linux.vnet.ibm.com, Linus Torvalds , Mathieu Desnoyers , "Frank Ch. Eigler" , David Wilder , hch@lst.de, Martin Bligh , Christoph Hellwig , Masami Hiramatsu , Steven Rostedt , Arnaldo Carvalho de Melo Subject: Re: [PATCH v9] Unified trace buffer In-Reply-To: <20080927200028.GA28937@elte.hu> Message-ID: References: <48DC406D.1050508@redhat.com> <20080927183912.GA13685@elte.hu> <20080927194105.GF18619@elte.hu> <20080927200028.GA28937@elte.hu> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 Sep 2008, Ingo Molnar wrote: > > > > no, it is not readable. My point was that you should do: > > > > > > > > RB_ENUM_TYPE, /* > > > > * Comment > > > > */ > > > > > > > > The comment is not at the same line as the enum, which also looks > > > > unpleasing. > > > > > > but you did: > > > > > > > RB_ENUM_TYPE, /* Comment > > > > */ > > > OK, I did a quick survey of what others did in include/linux to handle multi line comments for enums. I ignored the single line comments since that is pretty standard. Here's what I found: Those that do: enum myenum { ENUM_PING_PONG, /* Bounce a ball back and forth till you have a winner. */ ENUM_HONEY_CONE, /* Soft and sweet a yummy for the tummy. */ }; include/linux/atmdev.h include/linux/fd.h include/linux/hil.h include/linux/if_pppol2tp.h include/linux/ivtv.h include/linux/libata.h include/linux/mmzone.h include/linux/reiserfs_fs.h include/linux/reiserfs_fs_sb.h include/linux/rtnetlink.h include/linux/scc.h include/linux/videodev2.h Those that do: enum myenum { ENUM_PING_PONG, /* Bounce a ball back and forth */ /* till you have a winner. */ ENUM_HONEY_CONE, /* Soft and sweet a yummy for */ /* the tummy. */ }; include/linux/atmsvc.h include/linux/pktcdvd.h Those that do (what I did): enum myenum { ENUM_PING_PONG, /* Bounce a ball back and forth * till you have a winner. */ ENUM_HONEY_CONE, /* Soft and sweet a yummy for * the tummy. */ }; include/linux/buffer_head.h (with space between the two enums) include/linux/personality.h Those that do: enum myenum { /* * Bounce a ball back and forth * till you have a winner. */ ENUM_PING_PONG, /* * Soft and sweet a yummy for * the tummy. */ ENUM_HONEY_CONE, }; include/linux/cgroup.h include/linux/cn_proc.h include/linux/exportfs.h include/linux/fb.h include/linux/hil_mlc.h include/linux/pci.h include/linux/reiserfs_fs_i.h And finally Doc book style: /** * enum myenum * @ENUM_PING_PONG: Bounce a ball back and forth * till you have a winner. * @ENUM_HONEY_CONE: Soft and sweet a yummy for * the tummy. */ enum myenum { ENUM_PING_PONG, ENUM_HONEY_CONE, }; Note I did not see any enum users that did what you asked: enum myenum { ENUM_PING_PONG, /* * Bounce a ball back and forth * till you have a winner. */ ENUM_HONEY_CONE, /* * Soft and sweet a yummy for * the tummy. */ }; So by adding that, I will be adding yet another format. Actually I think the docbook style is the most appropriate for me. I'll go with that one. Thanks, -- Steve