On 27 July 2018 at 14:03, Stefan Hajnoczi <stefa...@gmail.com> wrote: > On Thu, Jul 19, 2018 at 08:42:05AM +0200, Markus Armbruster wrote: >> 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.
I think that overall if you look at QEMU's code we have a lot of consistency in that we follow the common "open source Unix C code" coding style. For instance if you look at: static BOOL GetSystemName( const void *pvSystemStore, DWORD dwFlags, PENUM_ARG pEnumArg, LPCWSTR *ppwszSystemName ) { you probably recognize immediately that it's Windows style, and we don't require checkpatch to avoid code that is that sharply divergent from the cultural norm. CODING_STYLE has a lot of nitpicky stuff because we mostly disagree about the edge cases rather than the core things, I think. thanks -- PMM