From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] numa.c: use spaces instead of tabs Date: Wed, 3 Sep 2014 11:52:49 +0200 Message-ID: <1409737969.2673.35.camel@Solace.lan> References: <1409717890-2837-1-git-send-email-ufimtseva@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1703046721132877853==" Return-path: In-Reply-To: <1409717890-2837-1-git-send-email-ufimtseva@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Elena Ufimtseva Cc: keir@xen.org, Ian.Campbell@citrix.com, george.dunlap@eu.citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org --===============1703046721132877853== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-OH8JftX5AaLBZ2aB+NmN" --=-OH8JftX5AaLBZ2aB+NmN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mer, 2014-09-03 at 00:18 -0400, Elena Ufimtseva wrote: > Signed-off-by: Elena Ufimtseva > --- > I think the patch does what the subject says, i.e., converting tabs to spaces, and does it right (I've only one question, see below). However, does it make sense, while at it, to turn the file into a Xen's code stile compliant one? Because, if yes, there are other things than tabs-->spaces that needs fixing, I believe. > --- a/xen/arch/x86/numa.c > +++ b/xen/arch/x86/numa.c > @@ -67,53 +67,53 @@ int srat_disabled(void) > static int __init populate_memnodemap(const struct node *nodes, > int numnodes, int shift, int *node= ids) > { > - unsigned long spdx, epdx; > - int i, res =3D -1; > - > - memset(memnodemap, NUMA_NO_NODE, memnodemapsize * sizeof(*memnodemap)); > - for (i =3D 0; i < numnodes; i++) { > - spdx =3D paddr_to_pdx(nodes[i].start); > - epdx =3D paddr_to_pdx(nodes[i].end - 1) + 1; > - if (spdx >=3D epdx) > - continue; > - if ((epdx >> shift) >=3D memnodemapsize) > - return 0; > - do { > - if (memnodemap[spdx >> shift] !=3D NUMA_NO_NODE) > - return -1; > - > - if (!nodeids) > - memnodemap[spdx >> shift] =3D i; > - else > - memnodemap[spdx >> shift] =3D nodeids[i]; > - > - spdx +=3D (1UL << shift); > - } while (spdx < epdx); > - res =3D 1; > - } > - return res; > + unsigned long spdx, epdx; > + int i, res =3D -1; > + > + memset(memnodemap, NUMA_NO_NODE, memnodemapsize * sizeof(*memnodemap= )); > + for (i =3D 0; i < numnodes; i++) { > For example here. In Xen's style, this would become something like: for ( i =3D 0; i < numnodes; i++ ) { And the same throughout all the for-s and if-s in the file. > /* > @@ -121,83 +121,83 @@ static int __init allocate_cachealigned_memnodemap(= void) > * maximum possible shift. > */ > static int __init extract_lsb_from_nodes(const struct node *nodes, > - int numnodes) > + int numnodes) > Perhaps I am the one missing something here, but shouldn't this still be aligned to the '(' above (through spaces, of course)? Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-OH8JftX5AaLBZ2aB+NmN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlQG5PEACgkQk4XaBE3IOsTCkwCglfh56W9wDHZ8AuTczAEZ0dQL 0awAn2xxAhE1MA3QpD/8uc80x2CeIIlm =hHGq -----END PGP SIGNATURE----- --=-OH8JftX5AaLBZ2aB+NmN-- --===============1703046721132877853== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1703046721132877853==--