From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsWBi-00024h-Tf for qemu-devel@nongnu.org; Fri, 07 Oct 2016 10:31:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsWBe-0006Ku-Sz for qemu-devel@nongnu.org; Fri, 07 Oct 2016 10:31:50 -0400 References: <1475829975-17413-1-git-send-email-anand.indukala@gmail.com> From: Eric Blake Message-ID: <290de67f-8505-fbd7-c2fa-6fbe7ca604eb@redhat.com> Date: Fri, 7 Oct 2016 09:31:44 -0500 MIME-Version: 1.0 In-Reply-To: <1475829975-17413-1-git-send-email-anand.indukala@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b0pGfpjQVi3NVSPwCcHm0i1a0dAo4anFc" 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 , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --b0pGfpjQVi3NVSPwCcHm0i1a0dAo4anFc From: Eric Blake To: Anand J , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org Message-ID: <290de67f-8505-fbd7-c2fa-6fbe7ca604eb@redhat.com> Subject: Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes References: <1475829975-17413-1-git-send-email-anand.indukala@gmail.com> In-Reply-To: <1475829975-17413-1-git-send-email-anand.indukala@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 year from now to find new culprits? If so, listing it in the commit message would be worthwhile. Is it something we should add to scripts/clean-includes? >=20 > Signed-off-by: Anand J > --- > +++ b/disas/libvixl/vixl/globals.h > @@ -46,7 +46,6 @@ > #include > #include > #include > -#include > #include > #include > #include "vixl/platform.h" scripts/clean-includes intentionally ignores disas/libvixl because that source is copied from elsewhere with minimal changes; are you sure this hunk is appropriate? > +++ b/hw/pci-bridge/pci_expander_bridge.c > @@ -13,7 +13,6 @@ > #include "qemu/osdep.h" > #include "qapi/error.h" > #include "hw/pci/pci.h" > -#include "hw/pci/pci_bus.h" > #include "hw/pci/pci_host.h" > #include "hw/pci/pci_bus.h" Changes like this are obviously correct... > #include "hw/pci/pci_bridge.h" > diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c > index 4b2f07a..d01798f 100644 > --- a/hw/ppc/ppc405_boards.c > +++ b/hw/ppc/ppc405_boards.c > @@ -37,7 +37,6 @@ > #include "qemu/log.h" > #include "qemu/error-report.h" > #include "hw/loader.h" > -#include "sysemu/block-backend.h" > #include "sysemu/blockdev.h" > #include "exec/address-spaces.h" =2E..while changes like this require looking at context. But the nice par= t of this patch is that if it compiles, it is correct... > +++ b/hw/usb/dev-mtp.c > @@ -17,7 +17,6 @@ > #include > #ifdef CONFIG_INOTIFY1 > #include > -#include "qapi/error.h" > #include "qemu/main-loop.h" > #endif =2E..well, ones like this are a little trickier (if CONFIG_INOTIFY1 is no= t defined, a completed compilation is no indication of success - but reading context shows it is correct, and the duplicate include was just outside of the diff context). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --b0pGfpjQVi3NVSPwCcHm0i1a0dAo4anFc 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/ iQEcBAEBCAAGBQJX97HQAAoJEKeha0olJ0NqtO4IAIaHaQ1QOL+uXuBsKxTXR3bh vCc7JQMVug2169Rmn1S0fMcn1Zcd/NKwUhqPiSlbuKyVhnQ8K5FlC8PP5+JZxblK qE4VnhMxK5KimteIx7dHlmxScDK4qKosQGADDLcEemiaA1OgD1GXuYfCKw+l+F6t llDH1dKbcr5WnuV3qdYNsH+t0QewmOGOiS/KVa8yDo9GKS5sA3wY/8JRORnYMO1J qIfZrSFmTk8MFPWoekRM9erh6R+rss4qMUGZl2+pHAuIPTyLuvCQvA8apjca/pPO qHlZMkKWQoItN1ZQwsu5nmIGU96FA7jH2vlkf81mDAj+u3AG1IpAqiUcuKrxwlg= =GjEK -----END PGP SIGNATURE----- --b0pGfpjQVi3NVSPwCcHm0i1a0dAo4anFc--