qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org, Evgeny Voevodin <e.voevodin@samsung.com>,
	Dmitry Solodkiy <d.solodkiy@samsung.com>
Subject: Re: [Qemu-devel] Restore consistent formatting
Date: Wed, 08 Feb 2012 09:48:33 -0600	[thread overview]
Message-ID: <4F329951.5060506@codemonkey.ws> (raw)
In-Reply-To: <4F329660.7040101@suse.de>

On 02/08/2012 09:36 AM, Andreas Färber wrote:
> Am 08.02.2012 16:23, schrieb Anthony Liguori:
>> On 02/08/2012 09:04 AM, malc wrote:
>>> On Wed, 8 Feb 2012, Andreas F?rber wrote:
>>>
>>>> Arbitrarily reformatting your files is not okay. If you want a different
>>>> formatting, you need to fix checkpatch.pl first to not error on that
>>>> formatting in your files.
>>>
>>> It was always formatter like this (internally consistent), then others
>>> added code which made it not so.
>>
>> We do have a mixed style in the audio layer.  I'm not happy about that
>> but I also feel strongly that going through and doing a reformat is not
>> a worthwhile exercise.
>>
>> I can also understand the desire to keep things consistent.  But patches
>> should always go to the mailing list.  I certainly would have acked such
>> a patch FWIW.
>>
>> I think people get a bit too excited about coding style.  There are much
>> more important things to worry about in life than the number of spaces
>> before a parenthesis :-)
>
> This is not about whether or not we put a space somewhere.
>
> It's about reviewers and SubmitAPatch telling people to run
> checkpatch.pl on patches and checkpatch.pl reporting this as an ERROR,
> not a WARNING. So if you follow Stefan's instructions on running the
> script as a commit hook (which is the only sane way to run it when
> handling lots of patches) you can't commit a patch or your local changes
> when there are ERRORs.

It's a suggestion, it still assumes that you are going to exercise discretion 
and make rational decisions when checkpatch does something silly.

>
> I just spent half the night trying to find out why checkpatch.pl reports
> CPUX86State *env, CPUYState *env, CPyState *env as ERRORs but not
> CPUState *env. I did not succeed in really understanding it.
>
> So either we need to all stop using and telling to use checkpatch.pl or
> someone needs to fix it.

checkpatch.pl is a tool.  Tools are meant to make our lives easier, not harder. 
  You should use checkpatch.pl to help you figure out if you have coding style 
issues but it is not a QEMU maintainer that gives you a required Ack before you 
code gets accepted.  If it's doing something stupid, ignore it.

Making checkpatch 100% perfect (or event 99% perfect) is simply not worth the 
effort.  Parsing C is insanely hard and doing it in perl only makes the problem 
worse :-)

If you want to tone down the language in SubmitAPatch, please go ahead.  It's a 
wiki after all.

Regards,

Anthony Liguori

>
> Andreas
>

  reply	other threads:[~2012-02-08 15:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 10:11 [Qemu-devel] Restore consistent formatting Evgeny Voevodin
2012-02-08 12:41 ` Andreas Färber
2012-02-08 15:04   ` malc
2012-02-08 15:23     ` Anthony Liguori
2012-02-08 15:36       ` Andreas Färber
2012-02-08 15:48         ` Anthony Liguori [this message]
2012-02-11  9:19         ` Blue Swirl
2012-02-11 12:18           ` Andreas Färber
2012-02-09  9:48       ` Markus Armbruster
2012-02-09 13:46         ` Anthony Liguori
2012-02-11  9:05       ` Blue Swirl
2012-02-08 15:28     ` Andreas Färber

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=4F329951.5060506@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=afaerber@suse.de \
    --cc=blauwirbel@gmail.com \
    --cc=d.solodkiy@samsung.com \
    --cc=e.voevodin@samsung.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).