Message ID | 20230119065959.3104012-17-armbru@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Clean up includes | expand |
On 19/1/23 07:59, Markus Armbruster wrote: > This commit was created with scripts/clean-includes. > > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > audio/sndioaudio.c | 2 +- > backends/hostmem-epc.c | 2 +- > block/export/vduse-blk.c | 2 +- > hw/hyperv/syndbg.c | 2 +- > util/async-teardown.c | 12 ++++-------- > 5 files changed, 8 insertions(+), 12 deletions(-) > > diff --git a/audio/sndioaudio.c b/audio/sndioaudio.c > index 632b0e3825..3fde01fdbd 100644 > --- a/audio/sndioaudio.c > +++ b/audio/sndioaudio.c > @@ -14,9 +14,9 @@ > * to recording, which is what guest systems expect. > */ > > +#include "qemu/osdep.h" > #include <poll.h> > #include <sndio.h> > -#include "qemu/osdep.h" > #include "qemu/main-loop.h" > #include "audio.h" > #include "trace.h" > diff --git a/backends/hostmem-epc.c b/backends/hostmem-epc.c > index 037292d267..4e162d6789 100644 > --- a/backends/hostmem-epc.c > +++ b/backends/hostmem-epc.c > @@ -9,9 +9,9 @@ > * This work is licensed under the terms of the GNU GPL, version 2 or later. > * See the COPYING file in the top-level directory. > */ > -#include <sys/ioctl.h> > > #include "qemu/osdep.h" > +#include <sys/ioctl.h> > #include "qom/object_interfaces.h" > #include "qapi/error.h" > #include "sysemu/hostmem.h" > diff --git a/block/export/vduse-blk.c b/block/export/vduse-blk.c > index 350d6fdaf0..f7ae44e3ce 100644 > --- a/block/export/vduse-blk.c > +++ b/block/export/vduse-blk.c > @@ -10,9 +10,9 @@ > * later. See the COPYING file in the top-level directory. > */ > > +#include "qemu/osdep.h" > #include <sys/eventfd.h> > > -#include "qemu/osdep.h" > #include "qapi/error.h" > #include "block/export.h" > #include "qemu/error-report.h" > diff --git a/hw/hyperv/syndbg.c b/hw/hyperv/syndbg.c > index 16d04cfdc6..94fe1b534b 100644 > --- a/hw/hyperv/syndbg.c > +++ b/hw/hyperv/syndbg.c > @@ -5,8 +5,8 @@ > * See the COPYING file in the top-level directory. > */ > > -#include "qemu/ctype.h" > #include "qemu/osdep.h" > +#include "qemu/ctype.h" > #include "qemu/error-report.h" > #include "qemu/main-loop.h" > #include "qemu/sockets.h" Up to here: Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > diff --git a/util/async-teardown.c b/util/async-teardown.c > index 62bfce1b3c..62cdeb0f20 100644 > --- a/util/async-teardown.c > +++ b/util/async-teardown.c > @@ -10,16 +10,12 @@ > * option) any later version. See the COPYING file in the top-level directory. > * > */ > -#include <stdlib.h> > -#include <stdio.h> > -#include <sys/types.h> > -#include <dirent.h> > -#include <sys/prctl.h> > -#include <signal.h> > -#include <sched.h> > -#include <unistd.h> > > #include "qemu/osdep.h" > +#include <dirent.h> > +#include <sys/prctl.h> > +#include <sched.h> > + > #include "qemu/async-teardown.h" This file has more changes.
Philippe Mathieu-Daudé <philmd@linaro.org> writes: > On 19/1/23 07:59, Markus Armbruster wrote: >> This commit was created with scripts/clean-includes. >> Signed-off-by: Markus Armbruster <armbru@redhat.com> [...] > Up to here: > > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > >> diff --git a/util/async-teardown.c b/util/async-teardown.c >> index 62bfce1b3c..62cdeb0f20 100644 >> --- a/util/async-teardown.c >> +++ b/util/async-teardown.c >> @@ -10,16 +10,12 @@ >> * option) any later version. See the COPYING file in the top-level directory. >> * >> */ >> -#include <stdlib.h> >> -#include <stdio.h> >> -#include <sys/types.h> >> -#include <dirent.h> >> -#include <sys/prctl.h> >> -#include <signal.h> >> -#include <sched.h> >> -#include <unistd.h> >> >> #include "qemu/osdep.h" >> +#include <dirent.h> >> +#include <sys/prctl.h> >> +#include <sched.h> >> + >> #include "qemu/async-teardown.h" > > This file has more changes. I'm not sure I understand. The patch does two related things: 1. It puts qemu/osdep.h first. The diff makes it look like we leave it in place and move other stuff across, but that's the same. 2. It deletes inclusions of headers qemu/osdep.h already includes: <stdlib.h> <stdio.h> <sys/types.h> <signal.h> <unistd.h> What would you like me to change or explain?
On 19/1/23 12:41, Markus Armbruster wrote: > Philippe Mathieu-Daudé <philmd@linaro.org> writes: > >> On 19/1/23 07:59, Markus Armbruster wrote: >>> This commit was created with scripts/clean-includes. >>> Signed-off-by: Markus Armbruster <armbru@redhat.com> > > [...] > >> Up to here: >> >> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> >> >>> diff --git a/util/async-teardown.c b/util/async-teardown.c >>> index 62bfce1b3c..62cdeb0f20 100644 >>> --- a/util/async-teardown.c >>> +++ b/util/async-teardown.c >>> @@ -10,16 +10,12 @@ >>> * option) any later version. See the COPYING file in the top-level directory. >>> * >>> */ >>> -#include <stdlib.h> >>> -#include <stdio.h> >>> -#include <sys/types.h> >>> -#include <dirent.h> >>> -#include <sys/prctl.h> >>> -#include <signal.h> >>> -#include <sched.h> >>> -#include <unistd.h> >>> >>> #include "qemu/osdep.h" >>> +#include <dirent.h> >>> +#include <sys/prctl.h> >>> +#include <sched.h> >>> + >>> #include "qemu/async-teardown.h" >> >> This file has more changes. > > I'm not sure I understand. > > The patch does two related things: > > 1. It puts qemu/osdep.h first. The diff makes it look like we leave it > in place and move other stuff across, but that's the same. > > 2. It deletes inclusions of headers qemu/osdep.h already includes: > > <stdlib.h> > <stdio.h> > <sys/types.h> > <signal.h> > <unistd.h> Ah, the other files get this done in the "Drop duplicate #include" patch.
Philippe Mathieu-Daudé <philmd@linaro.org> writes: > On 19/1/23 12:41, Markus Armbruster wrote: >> Philippe Mathieu-Daudé <philmd@linaro.org> writes: >> >>> On 19/1/23 07:59, Markus Armbruster wrote: >>>> This commit was created with scripts/clean-includes. >>>> Signed-off-by: Markus Armbruster <armbru@redhat.com> >> [...] >> >>> Up to here: >>> >>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> >>> >>>> diff --git a/util/async-teardown.c b/util/async-teardown.c >>>> index 62bfce1b3c..62cdeb0f20 100644 >>>> --- a/util/async-teardown.c >>>> +++ b/util/async-teardown.c >>>> @@ -10,16 +10,12 @@ >>>> * option) any later version. See the COPYING file in the top-level directory. >>>> * >>>> */ >>>> -#include <stdlib.h> >>>> -#include <stdio.h> >>>> -#include <sys/types.h> >>>> -#include <dirent.h> >>>> -#include <sys/prctl.h> >>>> -#include <signal.h> >>>> -#include <sched.h> >>>> -#include <unistd.h> >>>> #include "qemu/osdep.h" >>>> +#include <dirent.h> >>>> +#include <sys/prctl.h> >>>> +#include <sched.h> >>>> + >>>> #include "qemu/async-teardown.h" >>> >>> This file has more changes. >> I'm not sure I understand. >> The patch does two related things: >> 1. It puts qemu/osdep.h first. The diff makes it look like we leave it >> in place and move other stuff across, but that's the same. >> 2. It deletes inclusions of headers qemu/osdep.h already includes: >> <stdlib.h> >> <stdio.h> >> <sys/types.h> >> <signal.h> >> <unistd.h> > > Ah, the other files get this done in the "Drop duplicate #include" patch. Right!
Philippe Mathieu-Daudé <philmd@linaro.org> writes: > On 19/1/23 12:41, Markus Armbruster wrote: >> Philippe Mathieu-Daudé <philmd@linaro.org> writes: >> >>> On 19/1/23 07:59, Markus Armbruster wrote: >>>> This commit was created with scripts/clean-includes. >>>> Signed-off-by: Markus Armbruster <armbru@redhat.com> >> [...] >> >>> Up to here: >>> >>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> >>> >>>> diff --git a/util/async-teardown.c b/util/async-teardown.c >>>> index 62bfce1b3c..62cdeb0f20 100644 >>>> --- a/util/async-teardown.c >>>> +++ b/util/async-teardown.c >>>> @@ -10,16 +10,12 @@ >>>> * option) any later version. See the COPYING file in the top-level directory. >>>> * >>>> */ >>>> -#include <stdlib.h> >>>> -#include <stdio.h> >>>> -#include <sys/types.h> >>>> -#include <dirent.h> >>>> -#include <sys/prctl.h> >>>> -#include <signal.h> >>>> -#include <sched.h> >>>> -#include <unistd.h> >>>> #include "qemu/osdep.h" >>>> +#include <dirent.h> >>>> +#include <sys/prctl.h> >>>> +#include <sched.h> >>>> + >>>> #include "qemu/async-teardown.h" >>> >>> This file has more changes. >> I'm not sure I understand. >> The patch does two related things: >> 1. It puts qemu/osdep.h first. The diff makes it look like we leave it >> in place and move other stuff across, but that's the same. >> 2. It deletes inclusions of headers qemu/osdep.h already includes: >> <stdlib.h> >> <stdio.h> >> <sys/types.h> >> <signal.h> >> <unistd.h> > > Ah, the other files get this done in the "Drop duplicate #include" patch. I assume this extends your R-by to the complete patch. Correct me if I'm wrong, please.
Markus Armbruster <armbru@redhat.com> wrote: > This commit was created with scripts/clean-includes. > > Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
diff --git a/audio/sndioaudio.c b/audio/sndioaudio.c index 632b0e3825..3fde01fdbd 100644 --- a/audio/sndioaudio.c +++ b/audio/sndioaudio.c @@ -14,9 +14,9 @@ * to recording, which is what guest systems expect. */ +#include "qemu/osdep.h" #include <poll.h> #include <sndio.h> -#include "qemu/osdep.h" #include "qemu/main-loop.h" #include "audio.h" #include "trace.h" diff --git a/backends/hostmem-epc.c b/backends/hostmem-epc.c index 037292d267..4e162d6789 100644 --- a/backends/hostmem-epc.c +++ b/backends/hostmem-epc.c @@ -9,9 +9,9 @@ * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ -#include <sys/ioctl.h> #include "qemu/osdep.h" +#include <sys/ioctl.h> #include "qom/object_interfaces.h" #include "qapi/error.h" #include "sysemu/hostmem.h" diff --git a/block/export/vduse-blk.c b/block/export/vduse-blk.c index 350d6fdaf0..f7ae44e3ce 100644 --- a/block/export/vduse-blk.c +++ b/block/export/vduse-blk.c @@ -10,9 +10,9 @@ * later. See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include <sys/eventfd.h> -#include "qemu/osdep.h" #include "qapi/error.h" #include "block/export.h" #include "qemu/error-report.h" diff --git a/hw/hyperv/syndbg.c b/hw/hyperv/syndbg.c index 16d04cfdc6..94fe1b534b 100644 --- a/hw/hyperv/syndbg.c +++ b/hw/hyperv/syndbg.c @@ -5,8 +5,8 @@ * See the COPYING file in the top-level directory. */ -#include "qemu/ctype.h" #include "qemu/osdep.h" +#include "qemu/ctype.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qemu/sockets.h" diff --git a/util/async-teardown.c b/util/async-teardown.c index 62bfce1b3c..62cdeb0f20 100644 --- a/util/async-teardown.c +++ b/util/async-teardown.c @@ -10,16 +10,12 @@ * option) any later version. See the COPYING file in the top-level directory. * */ -#include <stdlib.h> -#include <stdio.h> -#include <sys/types.h> -#include <dirent.h> -#include <sys/prctl.h> -#include <signal.h> -#include <sched.h> -#include <unistd.h> #include "qemu/osdep.h" +#include <dirent.h> +#include <sys/prctl.h> +#include <sched.h> + #include "qemu/async-teardown.h" #ifdef _SC_THREAD_STACK_MIN
This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- audio/sndioaudio.c | 2 +- backends/hostmem-epc.c | 2 +- block/export/vduse-blk.c | 2 +- hw/hyperv/syndbg.c | 2 +- util/async-teardown.c | 12 ++++-------- 5 files changed, 8 insertions(+), 12 deletions(-)