From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJ8UE-0002DI-GS for qemu-devel@nongnu.org; Fri, 22 Mar 2013 16:22:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJ8UA-0007Ig-GS for qemu-devel@nongnu.org; Fri, 22 Mar 2013 16:22:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJ8UA-0007IX-8J for qemu-devel@nongnu.org; Fri, 22 Mar 2013 16:22:46 -0400 Message-ID: <514CBD90.5080102@redhat.com> Date: Fri, 22 Mar 2013 14:22:40 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363956370-23681-1-git-send-email-pl@kamp.de> <1363956370-23681-3-git-send-email-pl@kamp.de> <514CB312.4090203@redhat.com> <514CB8FD.2040007@kamp.de> In-Reply-To: <514CB8FD.2040007@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2IBMIXOLESIODLTDPMCGI" Subject: [Qemu-devel] indentation hints [was: [PATCHv4 2/9] cutils: add a function to find non-zero content in a buffer] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: Paolo Bonzini , quintela@redhat.com, Orit Wasserman , qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2IBMIXOLESIODLTDPMCGI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/22/2013 02:03 PM, Peter Lieven wrote: >>> + if (len % (BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR >>> + * sizeof(VECTYPE)) =3D=3D 0 >>> + && ((uintptr_t) buf) % sizeof(VECTYPE) =3D=3D 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)) =3D=3D 0 >> + && ((uintptr_t) buf) % sizeof(VECTYPE) =3D=3D 0) { >> >=20 > 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 unrollin= g, > 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 =2Edir-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). =09 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2IBMIXOLESIODLTDPMCGI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRTL2QAAoJEKeha0olJ0NqscUH/1xP1Xr7+J5op37eahlF/h7a y12gcepynaP06aPzsqQefkEYHtTsKuMJs/FeUCoOv0EWtqVHQVMutFR3C/7C4Wc8 0zp9eREf6XLbcw4Aw1O0O/NUmGsAFJb2FLrfuUQ8pQz/3GTwTstvukJLHtiHtLGm +Z/myAOk0OI/GrnTNEWX/RTB4cVadD1ShVr+r432xmU/3ZyCGnU+riwAlz9ZQki4 MZj80u1baGx/XDDRT292KE2/jBt1/KoZUxNBVMZmKEk0tJXxaj4emxReuLjMPqJ3 0ujgxjpZHLgHqiFNgyEkAu1Fgm57gPpzEOGxUCaELtUuVVeF1XHZDnSzS5ILxjU= =BvMN -----END PGP SIGNATURE----- ------enig2IBMIXOLESIODLTDPMCGI--