From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "Markus Armbruster" <armbru@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] Why do we typedef every struct on QEMU?
Date: Fri, 27 Jul 2018 14:14:06 +0100 [thread overview]
Message-ID: <20180727131406.GH17836@redhat.com> (raw)
In-Reply-To: <20180727130317.GE28555@stefanha-x1.localdomain>
On Fri, Jul 27, 2018 at 02:03:17PM +0100, Stefan Hajnoczi wrote:
> On Thu, Jul 19, 2018 at 08:42:05AM +0200, Markus Armbruster wrote:
> > Peter Maydell <peter.maydell@linaro.org> writes:
> >
> > > On 17 July 2018 at 20:50, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > Instead, we've repeatedly wasted time on debating which kind of ugly we
> > hate less, and all we can show for our troubles is CODING_STYLE. Which
> > leaves a whole lot more questions open than it answers, so we can keep
> > enjoying style debates.
> >
> > That the code shows anything resembling consistency at all is a
> > testament to humanity's yearning for order within a chaotic world.
>
> Going back to something concrete after this nice philosophical musing:
>
> The coding style checker (checkpatch.pl) seems like a huge success to
> me. Without it, achieving consistency is futile.
>
> checkpatch.pl defines the true coding style of QEMU - the subset that
> can be automatically checked by patchew. If we want to follow a coding
> style, implementing the rules in checkpatch.pl is important.
Sadly that is not enough and arguably making life worse in some ways.
The core problem is that we never change any existing code to follow
the coding style rules we add. We only require new code to use it. We
have plenty of code that goes years between being touched by a patch,
so we've got countless different coding styles present across the
source tree. What's worse is that when submitting new patches, you have
to merge unrelated style cleanup changes into your functional changes,
just so the patch can pass checkpatch.pl, or go back & clean up enough
of the existing code in a separate patch, so that your patch doesn't
trigger a checkpatch.pl violation :-(
I wish we'd do a blanket cleanup to get the entire codebase passing
checkpatch. Despite the downside that it'd create a conflict point
in the history for people cherry-picking to older branches in the short
term, I think it would be a net win over the long term (3+ years) to
actually have a real coding style that is consistently followed.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-07-27 13:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 19:50 [Qemu-devel] Why do we typedef every struct on QEMU? Eduardo Habkost
2018-07-17 20:06 ` Peter Maydell
2018-07-19 6:42 ` Markus Armbruster
2018-07-19 8:18 ` Thomas Huth
2018-07-19 8:28 ` Paolo Bonzini
2018-07-27 13:03 ` Stefan Hajnoczi
2018-07-27 13:14 ` Daniel P. Berrangé [this message]
2018-07-27 13:16 ` Peter Maydell
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=20180727131406.GH17836@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).