Received: from eggs.gnu.org ([2001:4830:134:3::10]:34840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bszGj-0006v3-62 for qemu-devel@nongnu.org; Sat, 08 Oct 2016 17:34:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bszGd-0000yQ-7p for qemu-devel@nongnu.org; Sat, 08 Oct 2016 17:34:56 -0400 References: <1475829975-17413-1-git-send-email-anand.indukala@gmail.com> <290de67f-8505-fbd7-c2fa-6fbe7ca604eb@redhat.com> From: Eric Blake Message-ID: <45036bfe-789a-3f56-4b24-a507b9e9140a@redhat.com> Date: Sat, 8 Oct 2016 16:34:47 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WAE5GoRI3KJB8hhXUBu4cbIsT21JaervJ" Subject: Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anand J Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WAE5GoRI3KJB8hhXUBu4cbIsT21JaervJ From: Eric Blake To: Anand J Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Message-ID: <45036bfe-789a-3f56-4b24-a507b9e9140a@redhat.com> Subject: Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes References: <1475829975-17413-1-git-send-email-anand.indukala@gmail.com> <290de67f-8505-fbd7-c2fa-6fbe7ca604eb@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/08/2016 06:32 AM, Anand J wrote: > I have replied for the questions inline. Also I'll make changes to the > patch as per the review and send the updated one. >=20 > Thanks, > Anand >=20 > On Fri, Oct 7, 2016 at 8:01 PM, Eric Blake wrote: >=20 >> On 10/07/2016 03:46 AM, Anand J wrote: >>> Some files contain multiple #includes of the same header file. >>> Removed most of those unnecessary duplicate entries. >> >> How did you find these? Is it a repeatable formula for rerunning a yea= r >> from now to find new culprits? If so, listing it in the commit messag= e >> would be worthwhile. Is it something we should add to >> scripts/clean-includes? >> > I executed the following bash script to get multiple occurrences of > #includes and manually checked each and every file from the output. >=20 > grep -r --exclude-dir=3Dbin/ "#include" | sort | uniq -c | awk '{if ($1= > 1) > print $2}' Seems simple enough that we ought to make it part of the scripts/clean-includes, rather than remembering to manually run it. >=20 > But there are lot of noise in the output of this command. Most of the > multiple #includes were not genuine issue. @Eric Do you want me to add = this > in the comment? Yes - whatever we end up with (whether a manual script or a run of scripts/clean-includes), documenting the process used makes it easier to verify that you didn't miss anything, and for someone else to repeat the process in another year when some mistakes have crept back in during the meantime. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --WAE5GoRI3KJB8hhXUBu4cbIsT21JaervJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX+WZ3AAoJEKeha0olJ0Nqmq4H/3ujTRwfwckw8pgezCuHY4l3 faXGDltpPrgA7zGlNvNAddfqg1TQrBP0v5Atf/Ez+AY/AI1JLCO9p6yjT6zVjaRE XRl2TOavn0uM+IXVozQ7e/vM1wYv8xQLiRkOXgplKfZiEZ6OXF8EnXOwz/hkrblm xMZ3xjcr6MDHYHXX7S0EwBL1BQQt3c/xPcKWb93+WKLM8TxLg/aTaYUMrY36iQde EYLhCCP8bZ3zMVEJsVwzhFYUYK2G/pgN9y70aY+v2nQDlpObd53aBDkRwvufCf5v UTzBmwWvlN4Fq8sUBuoHh3iCAb9Skm817MP2JosbPolpOzo7PCD7tzDVBTQ2AyI= =BYqt -----END PGP SIGNATURE----- --WAE5GoRI3KJB8hhXUBu4cbIsT21JaervJ--