[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] indentation hints [was: [PATCHv4 2/9] cutils: add a functio
From: |
Eric Blake |
Subject: |
[Qemu-devel] indentation hints [was: [PATCHv4 2/9] cutils: add a function to find non-zero content in a buffer] |
Date: |
Fri, 22 Mar 2013 14:22:40 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
On 03/22/2013 02:03 PM, Peter Lieven wrote:
>>> + if (len % (BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR
>>> + * sizeof(VECTYPE)) == 0
>>> + && ((uintptr_t) buf) % sizeof(VECTYPE) == 0) {
>> I know that emacs tends to indent the second line to the column after
>> the ( that it is associated with, as in:
>>
>> + if (len % (BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR
>> + * sizeof(VECTYPE)) == 0
>> + && ((uintptr_t) buf) % sizeof(VECTYPE) == 0) {
>>
>
> Actually, I was totally unsure how to indent this. Maybe just give
> a hint what you would like to see.
I thought I did just that, with my rewrite of your line (best if you
view the mail in fixed-width font) :)
> As I will replace patch 4 with
> an earlier version that is not vector optimized, but uses loop unrolling,
> I will have to do a v5 and so I can fix this.
Note that qemu.git already has a .exrc file that enables default vi
settings for vim users; I'm not sure if there is a counterpart
.dir-locals.el file to set up emacs settings, but someone probably has
one. Ultimately, having instructions on how to set up your editor so
that 'TAB' just magically indents to the preferred style seems like a
tip worth having on the wiki page on contributing a patch, but I'm not
sure I'm the one to provide such a patch (since I focus most of my qemu
work on reviewing other's patches, and not writing my own, I don't
really have my own preferred editor set up to indent in a qemu style).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCHv4 1/9] move vector definitions to qemu-common.h, (continued)
- [Qemu-devel] [PATCHv4 1/9] move vector definitions to qemu-common.h, Peter Lieven, 2013/03/22
- [Qemu-devel] [PATCHv4 9/9] migration: use XBZRLE only after bulk stage, Peter Lieven, 2013/03/22
- [Qemu-devel] [PATCHv4 4/9] bitops: use vector algorithm to optimize find_next_bit(), Peter Lieven, 2013/03/22
- [Qemu-devel] [PATCHv4 6/9] migration: add an indicator for bulk state of ram migration, Peter Lieven, 2013/03/22
- [Qemu-devel] [PATCHv4 2/9] cutils: add a function to find non-zero content in a buffer, Peter Lieven, 2013/03/22
- Re: [Qemu-devel] [PATCHv4 2/9] cutils: add a function to find non-zero content in a buffer, Orit Wasserman, 2013/03/25
[Qemu-devel] [PATCHv4 7/9] migration: do not sent zero pages in bulk stage, Peter Lieven, 2013/03/22
Re: [Qemu-devel] [PATCHv4 0/9] buffer_is_zero / migration optimizations, Paolo Bonzini, 2013/03/22