On 02/18/2016 11:05 AM, Peter Maydell wrote: > Clean up includes so that osdep.h is included first and headers > which it implies are not included manually. > > This commit was created with scripts/clean-includes. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > ---
> 56 files changed, 2 insertions(+), 100 deletions(-) > > +++ b/io/channel-util.c > @@ -18,6 +18,7 @@ > * > */ > > +#include "qemu/osdep.h" > #include "io/channel-util.h" > #include "io/channel-file.h" > #include "io/channel-socket.h" Ah, so the 2 insertions are due to recent file additions, after your last round of cleanups. Any way to automate this into checkpatch.pl for new file creation? Then again, not all developers have Coccinelle installed. But even checking whether the string 'include.*qemu/osdep.h' is present in a new file may help, even if it doesn't detect it being included out-of-order. > +++ b/slirp/slirp.h > @@ -1,11 +1,9 @@ > #ifndef __COMMON_H__ > #define __COMMON_H__ > > -#include "config-host.h" > #include "slirp_config.h" > > #ifdef _WIN32 > -# include <inttypes.h> > > typedef char *caddr_t; > > @@ -23,43 +21,31 @@ typedef char *caddr_t; > # endif > #endif > > -#include <sys/types.h> > #ifdef HAVE_SYS_BITYPES_H > # include <sys/bitypes.h> > #endif > > -#include <sys/time.h> > > #ifdef HAVE_UNISTD_H > -# include <unistd.h> > #endif > > #ifdef HAVE_STDLIB_H > -# include <stdlib.h> > #endif Leftover dead checks of HAVE_UNISTD_H and so forth; this file could use further manual cleanups. For that matter, do we even need HAVE_UNISTD_H in slirp/slirp_config.h any more? There's probably quite a bit of pruning of cruft we could do. But as this patch was completely automated, I'm fine if that cleanup is done as followups. Therefore, Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature