From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtHXK-0001sW-V2 for qemu-devel@nongnu.org; Thu, 01 Oct 2009 05:01:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtHXG-0001qu-9Z for qemu-devel@nongnu.org; Thu, 01 Oct 2009 05:01:18 -0400 Received: from [199.232.76.173] (port=38873 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtHXG-0001qp-4Z for qemu-devel@nongnu.org; Thu, 01 Oct 2009 05:01:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42811) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtHXF-0007nW-Iy for qemu-devel@nongnu.org; Thu, 01 Oct 2009 05:01:13 -0400 Date: Thu, 1 Oct 2009 11:01:08 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] Re: CODING_STYLE Message-ID: <20091001090108.GP9832@redhat.com> References: <20090923200635.GA21246@redhat.com> <20090924191121.GB29419@redhat.com> <20090929161115.GA13885@redhat.com> <20090930135142.GA20378@redhat.com> <20091001012548.GA26280@laped.iglesias.mooo.com> <20091001064129.GA5670@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091001064129.GA5670@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Blue Swirl , "Edgar E. Iglesias" , qemu-devel@nongnu.org, Juan Quintela On Thu, Oct 01, 2009 at 08:41:29AM +0200, Michael S. Tsirkin wrote: > On Thu, Oct 01, 2009 at 03:25:48AM +0200, Edgar E. Iglesias wrote: > > On Wed, Sep 30, 2009 at 07:00:21PM +0200, Juan Quintela wrote: > > > "Michael S. Tsirkin" wrote: > > > > > > .... > > > > > > >> Actually, I tried to tweak 'indent' to match QEMU style without much success. > > > >> > > > >> We could also select a new style, like Linux kernel one. I'm also not > > > >> a great fan of that either. But at least 'indent' could be used very > > > >> easily and I think there would be other benefits, like reuse of Git > > > >> hooks, patch checking scripts and Emacs configs. With full 'indent' > > > >> support all sources could be massaged mechanically to make the switch > > > >> less painful. > > > >> > > > >> Then there are K&R and GNU styles, but I like them even less. > > > > > > > > So ... Linux kernel style wins? What do others think? > > > > > > Where do I have to sign? > > > > Yeah. > > > > I really don't care very much. I've changed my CRIS and MicroBlaze code from > > style to style a couple of times but the only style regardless of style I find > > offensive is the: > > > > if (x) { > > x=1; > > } else { > > x=0; > > } > > > > TBH, the extra curley braceys are just pure nonsense. > > > > Remove those and I'm happy with tab or 2 or 4 or 8 or whatever amount of > > indentation spaces. > > > > Cheers > > The advantage of following linux kernel is you get automatic > code checking/correction tools. > Most importantly scripts/checkpatch.pl > > Deviate from it and you have to maintain your own. Add flag to checkpatch.pl to use different indentation an submit it upstream. -- Gleb.