[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Coding style (was Re: [PATCH v3 05/13] x86/altp2m: basic data structures and support routines.)

>>> On 06.07.15 at 18:50, <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> Ed White writes ("Re: [PATCH v3 05/13] x86/altp2m: basic data structures and 
> support routines."):
> ...
>> In every case, this is because I wrote the code to conform with the style
>> of the surrounding code. I'll fix them all, but I think the maintainers
>> need to be clear about which is more important -- following the coding
>> style or following the style of the surrounding code.
> Sadly there are indeed inconsistent style problems like this in
> various bits of the codebase.  I agree with Ed that maintainers need
> to be clear about what is more important.
> I also think that maintainers should (a) when making style complaints,
> be aware if the existing code style is inconsistent or wrong and
> (b) where it is, consider whether to grant submitters some leeway.

I don't think there's much to be discussed here - when a single
source file uses mostly one style with a couple of violations, the
mainly used style rules. Admittedly there are (pretty few) files
where the determination isn't that easy (and where I would
grant leeway without making any remarks), but none of those are
involved here afaict.

> That doesn't mean that it's not appropriate to ask a submitter to
> conform to a particular style; but it is important to remain
> respectful.

Respectful - yes. But especially considering the amount of patches
submitted during the last so many weeks/months, it is a waste of
reviewing resources to constantly and repeatedly (i.e. often to the
same submitter) have to point out coding style violations. Since
merely asking them to address this apparently doesn't help, I'm
slowly moving towards viewing the "respectful" the other way
around (i.e. such submissions wasting my and other reviewers'
time), which means that - as said - sooner or later I'll simply start
dropping such patches on the floor. After all, following style
conventions is mostly a matter of discipline - it doesn't require any
significant skills. And being contributor to different projects with
different styles isn't an excuse either (leaving aside occasional
mistakes of course) - being myself (occasional) contributor to
binutils, gcc, and linux, and considering the differences between
hypervisor, tools, qemu-trad, and qemu-upstream I already have
to follow half a dozen different styles, none of which matches what
I use in my own projects.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.