All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Blue Swirl <blauwirbel@gmail.com>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: [Qemu-devel] Re: CODING_STYLE
Date: Thu, 1 Oct 2009 12:02:21 +0200	[thread overview]
Message-ID: <20091001100220.GJ5718@redhat.com> (raw)
In-Reply-To: <20091001094616.GR9832@redhat.com>

On Thu, Oct 01, 2009 at 11:46:16AM +0200, Gleb Natapov wrote:
> On Thu, Oct 01, 2009 at 11:02:59AM +0200, Michael S. Tsirkin wrote:
> > On Thu, Oct 01, 2009 at 10:56:15AM +0200, Kevin Wolf wrote:
> > > Am 01.10.2009 03:25, schrieb Edgar E. Iglesias:
> > > > On Wed, Sep 30, 2009 at 07:00:21PM +0200, Juan Quintela wrote:
> > > >> "Michael S. Tsirkin" <mst@redhat.com> 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.
> > > 
> > > Except that when adding another line after x=1; the patch doesn't
> > > contain a change to the if line (with a possibly long condition and the
> > > possibility of introducing typos that nobody will see because everybody
> > > assumes it's just the new brace).
> > 
> > I don't think I saw a bug introduced this way in ages.
> > The absense of braces is easy enough to spot.
> > 
> With modern editors that indent automatically it's impossible not to
> spot.
> 
> > > But then, you could say the ugliness of braces is more important and I
> > > really don't care too much about the braces. However, I don't think we
> > > should change the coding style radically like switching to the Linux
> > > kernel style.
> > > 
> > > Kevin
> > 
> > I think this is the only way to get a consistent style, for 3 reasons:
> > - a lot of people hack at both projects, they just keep mixing styles
> > - linux has automatic checkers that are maintained and improved over time
> > - linux style is just better ;)
> > 
> Real men's editor (TM) is able to switch style depending on what you
> edit.
> --
> 			Gleb.

  reply	other threads:[~2009-10-01 10:04 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 20:06 [Qemu-devel] [PATCHv2] qemu: target library, use it in msix Michael S. Tsirkin
2009-09-24 17:50 ` [Qemu-devel] " Blue Swirl
2009-09-24 19:11   ` Michael S. Tsirkin
2009-09-24 20:13     ` Blue Swirl
2009-09-29 16:11       ` [Qemu-devel] CODING_STYLE (was Re: [PATCHv2] qemu: target library, use it in msix) Michael S. Tsirkin
2009-09-29 18:15         ` [Qemu-devel] " Blue Swirl
2009-09-30 13:51           ` Michael S. Tsirkin
2009-09-30 16:50             ` malc
2009-09-30 17:00             ` Avi Kivity
2009-09-30 17:29               ` Michael S. Tsirkin
2009-09-30 17:29               ` Blue Swirl
2009-09-30 21:01                 ` Anthony Liguori
2009-10-01  6:17                   ` Michael S. Tsirkin
2009-10-01  8:43                     ` Kevin Wolf
2009-10-01  8:58                       ` Michael S. Tsirkin
2009-10-01  9:10                         ` Kevin Wolf
2009-10-01  9:17                           ` Michael S. Tsirkin
2009-10-01  6:31                 ` Avi Kivity
2009-10-01  6:47                   ` Michael S. Tsirkin
2009-10-01  7:08                     ` Paolo Bonzini
2009-09-30 17:00             ` [Qemu-devel] Re: CODING_STYLE Juan Quintela
2009-10-01  1:25               ` Edgar E. Iglesias
2009-10-01  6:41                 ` Michael S. Tsirkin
2009-10-01  9:01                   ` Gleb Natapov
2009-10-01  8:56                 ` Kevin Wolf
2009-10-01  9:02                   ` Michael S. Tsirkin
2009-10-01  9:46                     ` Gleb Natapov
2009-10-01 10:02                       ` Michael S. Tsirkin [this message]
2009-10-01  9:01                 ` Gleb Natapov
2009-09-30 17:02             ` Markus Armbruster
2009-10-01  6:37               ` Amit Shah
2009-09-30 17:31             ` [Qemu-devel] Re: CODING_STYLE (was Re: [PATCHv2] qemu: target library, use it in msix) Paolo Bonzini
2009-09-30 17:32               ` Michael S. Tsirkin
2009-09-30 17:48               ` Michael S. Tsirkin
2009-09-30 18:32                 ` Paolo Bonzini
2009-10-01  6:00                   ` Michael S. Tsirkin
2009-09-30 20:11                 ` [Qemu-devel] Re: CODING_STYLE Markus Armbruster
2009-09-30 21:00               ` [Qemu-devel] Re: CODING_STYLE (was Re: [PATCHv2] qemu: target library, use it in msix) Anthony Liguori
2009-09-30 23:01                 ` [Qemu-devel] Re: CODING_STYLE Markus Armbruster
2009-09-30 23:24                   ` Anthony Liguori
2009-09-30 16:06           ` [Qemu-devel] Re: CODING_STYLE (was Re: [PATCHv2] qemu: target library, use it in msix) Christoph Hellwig
2009-09-30 16:14             ` Michael S. Tsirkin
2009-09-30 21:04               ` Anthony Liguori
2009-09-27  8:20   ` [Qemu-devel] Re: [PATCHv2] qemu: target library, use it in msix Michael S. Tsirkin
2009-09-27 10:40     ` Avi Kivity
2009-09-27 11:45       ` Michael S. Tsirkin
2009-09-27 11:55         ` Avi Kivity
2009-09-27 12:00           ` Michael S. Tsirkin
2009-09-27 12:19             ` Avi Kivity
2009-09-27 14:08               ` Michael S. Tsirkin
2009-09-27 14:14                 ` Avi Kivity
2009-09-27 14:21                   ` Michael S. Tsirkin
2009-09-27 14:24                     ` Michael S. Tsirkin
2009-09-27 15:19                       ` Blue Swirl
2009-09-29 14:50                         ` Michael S. Tsirkin
2009-09-29 15:15                           ` Blue Swirl
2009-09-29 15:57                             ` Michael S. Tsirkin
2009-09-29 16:26                               ` Avi Kivity
2009-09-29 16:38                                 ` Michael S. Tsirkin
2009-09-29 19:34                               ` Blue Swirl
2009-09-29 21:09                                 ` Michael S. Tsirkin
2009-09-27 14:26                     ` Avi Kivity
2009-09-29  7:19                       ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091001100220.GJ5718@redhat.com \
    --to=mst@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=gleb@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.