[PATCH v3 0/5] coroutine: Clean up includes

Markus Armbruster posted 5 patches 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221221131435.3851212-1-armbru@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, John Snow <jsnow@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, "Daniel P. Berrangé" <berrange@redhat.com>, Greg Kurz <groug@kaod.org>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>, Paolo Bonzini <pbonzini@redhat.com>, Eric Blake <eblake@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
crypto/block-luks-priv.h      |   1 -
hw/9pfs/coth.h                |   2 +-
include/block/aio.h           |   9 +-
include/block/aio_task.h      |   2 -
include/block/block-common.h  |   1 -
include/block/graph-lock.h    |   2 -
include/block/raw-aio.h       |   1 -
include/io/channel.h          |   2 +-
include/monitor/hmp.h         |   1 -
include/qemu/coroutine-core.h | 154 ++++++++++++++++++++++++++++++++++
include/qemu/coroutine.h      | 113 ++-----------------------
include/qemu/lockable.h       |   2 +-
include/qemu/osdep.h          |  16 ++++
include/qemu/progress_meter.h |   2 +-
include/qemu/typedefs.h       |   1 -
include/scsi/pr-manager.h     |   1 -
nbd/nbd-internal.h            |   1 -
block/progress_meter.c        |   2 +
blockjob.c                    |   1 -
crypto/block-luks.c           |   1 -
hw/9pfs/codir.c               |   1 -
hw/9pfs/cofile.c              |   1 -
hw/9pfs/cofs.c                |   1 -
hw/9pfs/coxattr.c             |   1 -
nbd/client-connection.c       |   1 +
tests/unit/test-aio.c         |   2 +-
tests/unit/test-coroutine.c   |   2 -
tests/unit/test-vmstate.c     |   1 -
ui/console.c                  |   1 +
util/async.c                  |   4 +-
util/qemu-coroutine-lock.c    |   1 -
util/qemu-coroutine-sleep.c   |   1 -
util/qemu-coroutine.c         |   1 -
33 files changed, 192 insertions(+), 141 deletions(-)
create mode 100644 include/qemu/coroutine-core.h
[PATCH v3 0/5] coroutine: Clean up includes
Posted by Markus Armbruster 1 year, 4 months ago
v3:
* PATCH 4: Unnecessary hunks dropped

v2:
* Rebased
* PATCH 4: Rewritten [Paolo]
* PATCH 5: New

Markus Armbruster (5):
  coroutine: Clean up superfluous inclusion of qemu/coroutine.h
  coroutine: Move coroutine_fn to qemu/osdep.h, trim includes
  coroutine: Clean up superfluous inclusion of qemu/lockable.h
  coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h
  coroutine: Use Coroutine typedef name instead of structure tag

 crypto/block-luks-priv.h      |   1 -
 hw/9pfs/coth.h                |   2 +-
 include/block/aio.h           |   9 +-
 include/block/aio_task.h      |   2 -
 include/block/block-common.h  |   1 -
 include/block/graph-lock.h    |   2 -
 include/block/raw-aio.h       |   1 -
 include/io/channel.h          |   2 +-
 include/monitor/hmp.h         |   1 -
 include/qemu/coroutine-core.h | 154 ++++++++++++++++++++++++++++++++++
 include/qemu/coroutine.h      | 113 ++-----------------------
 include/qemu/lockable.h       |   2 +-
 include/qemu/osdep.h          |  16 ++++
 include/qemu/progress_meter.h |   2 +-
 include/qemu/typedefs.h       |   1 -
 include/scsi/pr-manager.h     |   1 -
 nbd/nbd-internal.h            |   1 -
 block/progress_meter.c        |   2 +
 blockjob.c                    |   1 -
 crypto/block-luks.c           |   1 -
 hw/9pfs/codir.c               |   1 -
 hw/9pfs/cofile.c              |   1 -
 hw/9pfs/cofs.c                |   1 -
 hw/9pfs/coxattr.c             |   1 -
 nbd/client-connection.c       |   1 +
 tests/unit/test-aio.c         |   2 +-
 tests/unit/test-coroutine.c   |   2 -
 tests/unit/test-vmstate.c     |   1 -
 ui/console.c                  |   1 +
 util/async.c                  |   4 +-
 util/qemu-coroutine-lock.c    |   1 -
 util/qemu-coroutine-sleep.c   |   1 -
 util/qemu-coroutine.c         |   1 -
 33 files changed, 192 insertions(+), 141 deletions(-)
 create mode 100644 include/qemu/coroutine-core.h

-- 
2.38.1
Re: [PATCH v3 0/5] coroutine: Clean up includes
Posted by Philippe Mathieu-Daudé 1 year, 4 months ago
On 21/12/22 14:14, Markus Armbruster wrote:
> v3:
> * PATCH 4: Unnecessary hunks dropped
> 
> v2:
> * Rebased
> * PATCH 4: Rewritten [Paolo]
> * PATCH 5: New
> 
> Markus Armbruster (5):
>    coroutine: Clean up superfluous inclusion of qemu/coroutine.h
>    coroutine: Move coroutine_fn to qemu/osdep.h, trim includes
>    coroutine: Clean up superfluous inclusion of qemu/lockable.h
>    coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h
>    coroutine: Use Coroutine typedef name instead of structure tag

I had to add:

-- >8 --
diff --git a/hw/pci/pci-hmp-cmds.c b/hw/pci/pci-hmp-cmds.c
index fb7591d6ab..b09fce9377 100644
--- a/hw/pci/pci-hmp-cmds.c
+++ b/hw/pci/pci-hmp-cmds.c
@@ -15,6 +15,7 @@

  #include "qemu/osdep.h"
  #include "hw/pci/pci.h"
+#include "hw/pci/pci_device.h"
  #include "monitor/hmp.h"
  #include "monitor/monitor.h"
  #include "pci-internal.h"
diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c
index 8e7282658f..3d4497da99 100644
--- a/hw/virtio/virtio-qmp.c
+++ b/hw/virtio/virtio-qmp.c
@@ -11,6 +11,7 @@

  #include "qemu/osdep.h"
  #include "hw/virtio/virtio.h"
+#include "hw/virtio/vhost.h"
  #include "virtio-qmp.h"

---

Otherwise I get:

../hw/pci/pci-hmp-cmds.c: In function ‘pcibus_dev_print’:
../hw/pci/pci-hmp-cmds.c:129:31: error: invalid use of incomplete 
typedef ‘PCIDevice’
   129 |     int class = pci_get_word(d->config + PCI_CLASS_DEVICE);
       |                               ^~

../hw/virtio/virtio-qmp.c:187:19: error: 
‘VHOST_USER_F_PROTOCOL_FEATURES’ undeclared here (not in a function); 
did you mean ‘VHOST_USER_PROTOCOL_F_RARP’?
   187 |     FEATURE_ENTRY(VHOST_USER_F_PROTOCOL_FEATURES, \
       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Maybe some recently merged change?

Otherwise:
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH v3 0/5] coroutine: Clean up includes
Posted by Markus Armbruster 1 year, 4 months ago
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 21/12/22 14:14, Markus Armbruster wrote:
>> v3:
>> * PATCH 4: Unnecessary hunks dropped
>> v2:
>> * Rebased
>> * PATCH 4: Rewritten [Paolo]
>> * PATCH 5: New
>> Markus Armbruster (5):
>>    coroutine: Clean up superfluous inclusion of qemu/coroutine.h
>>    coroutine: Move coroutine_fn to qemu/osdep.h, trim includes
>>    coroutine: Clean up superfluous inclusion of qemu/lockable.h
>>    coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h
>>    coroutine: Use Coroutine typedef name instead of structure tag
>
> I had to add:
>
> -- >8 --
> diff --git a/hw/pci/pci-hmp-cmds.c b/hw/pci/pci-hmp-cmds.c
> index fb7591d6ab..b09fce9377 100644
> --- a/hw/pci/pci-hmp-cmds.c
> +++ b/hw/pci/pci-hmp-cmds.c
> @@ -15,6 +15,7 @@
>
>  #include "qemu/osdep.h"
>  #include "hw/pci/pci.h"
> +#include "hw/pci/pci_device.h"
>  #include "monitor/hmp.h"
>  #include "monitor/monitor.h"
>  #include "pci-internal.h"
> diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c
> index 8e7282658f..3d4497da99 100644
> --- a/hw/virtio/virtio-qmp.c
> +++ b/hw/virtio/virtio-qmp.c
> @@ -11,6 +11,7 @@
>
>  #include "qemu/osdep.h"
>  #include "hw/virtio/virtio.h"
> +#include "hw/virtio/vhost.h"
>  #include "virtio-qmp.h"
>
> ---
>
> Otherwise I get:
>
> ../hw/pci/pci-hmp-cmds.c: In function ‘pcibus_dev_print’:
> ../hw/pci/pci-hmp-cmds.c:129:31: error: invalid use of incomplete typedef ‘PCIDevice’
>   129 |     int class = pci_get_word(d->config + PCI_CLASS_DEVICE);
>       |                               ^~
>
> ../hw/virtio/virtio-qmp.c:187:19: error: ‘VHOST_USER_F_PROTOCOL_FEATURES’ undeclared here (not in a function); 
> did you mean ‘VHOST_USER_PROTOCOL_F_RARP’?
>   187 |     FEATURE_ENTRY(VHOST_USER_F_PROTOCOL_FEATURES, \
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> Maybe some recently merged change?

Yes.  I'll rebase.

> Otherwise:
> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Thanks!


PS: While looking for commits that caused these conflicts, I saw

commit 28b629ab4aa93b9b7ec79c7e480611e4554586be
    Signed-off-by: Philippe Mathieu-Daudé <a class="moz-txt-link-rfc2396E" href="mailto:philmd@linaro.org">&lt;philmd@linaro.org&gt;</a>

commit 69779192acfeb9480183fd076be7480de56b1009
    Signed-off-by: Philippe Mathieu-Daudé <a class="moz-txt-link-rfc2396E" href="mailto:philmd@linaro.org">&lt;philmd@linaro.org&gt;</a>

commit f983e598e5a4eada5bfa4731c9db9fba1943e4e6
    Suggested-by: Richard Henderson <a class="moz-txt-link-rfc2396E" href="mailto:richard.henderson@linaro.org">&lt;richard.henderson@linaro.org&gt;</a>
    Signed-off-by: Philippe Mathieu-Daudé <a class="moz-txt-link-rfc2396E" href="mailto:philmd@linaro.org">&lt;philmd@linaro.org&gt;</a>

Please stop that :)
Re: [PATCH v3 0/5] coroutine: Clean up includes
Posted by Markus Armbruster 1 year, 4 months ago
Markus Armbruster <armbru@redhat.com> writes:

> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>
>> On 21/12/22 14:14, Markus Armbruster wrote:
>>> v3:
>>> * PATCH 4: Unnecessary hunks dropped
>>> v2:
>>> * Rebased
>>> * PATCH 4: Rewritten [Paolo]
>>> * PATCH 5: New
>>> Markus Armbruster (5):
>>>    coroutine: Clean up superfluous inclusion of qemu/coroutine.h
>>>    coroutine: Move coroutine_fn to qemu/osdep.h, trim includes
>>>    coroutine: Clean up superfluous inclusion of qemu/lockable.h
>>>    coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h
>>>    coroutine: Use Coroutine typedef name instead of structure tag
>>
>> I had to add:
>>
>> -- >8 --
>> diff --git a/hw/pci/pci-hmp-cmds.c b/hw/pci/pci-hmp-cmds.c
>> index fb7591d6ab..b09fce9377 100644
>> --- a/hw/pci/pci-hmp-cmds.c
>> +++ b/hw/pci/pci-hmp-cmds.c
>> @@ -15,6 +15,7 @@
>>
>>  #include "qemu/osdep.h"
>>  #include "hw/pci/pci.h"
>> +#include "hw/pci/pci_device.h"
>>  #include "monitor/hmp.h"
>>  #include "monitor/monitor.h"
>>  #include "pci-internal.h"
>> diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c
>> index 8e7282658f..3d4497da99 100644
>> --- a/hw/virtio/virtio-qmp.c
>> +++ b/hw/virtio/virtio-qmp.c
>> @@ -11,6 +11,7 @@
>>
>>  #include "qemu/osdep.h"
>>  #include "hw/virtio/virtio.h"
>> +#include "hw/virtio/vhost.h"
>>  #include "virtio-qmp.h"
>>
>> ---
>>
>> Otherwise I get:
>>
>> ../hw/pci/pci-hmp-cmds.c: In function ‘pcibus_dev_print’:
>> ../hw/pci/pci-hmp-cmds.c:129:31: error: invalid use of incomplete typedef ‘PCIDevice’
>>   129 |     int class = pci_get_word(d->config + PCI_CLASS_DEVICE);
>>       |                               ^~
>>
>> ../hw/virtio/virtio-qmp.c:187:19: error: ‘VHOST_USER_F_PROTOCOL_FEATURES’ undeclared here (not in a function); 
>> did you mean ‘VHOST_USER_PROTOCOL_F_RARP’?
>>   187 |     FEATURE_ENTRY(VHOST_USER_F_PROTOCOL_FEATURES, \
>>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>> Maybe some recently merged change?
>
> Yes.  I'll rebase.

To avoid confusion: this series doesn't need a rebase.  "[PATCH 0/5]
include/hw/pci include/hw/cxl: Clean up includes" does.

[...]
Re: [PATCH v3 0/5] coroutine: Clean up includes
Posted by Philippe Mathieu-Daudé 1 year, 4 months ago
On 22/12/22 06:21, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> PS: While looking for commits that caused these conflicts, I saw
> 
> commit 28b629ab4aa93b9b7ec79c7e480611e4554586be
>      Signed-off-by: Philippe Mathieu-Daudé <a class="moz-txt-link-rfc2396E" href="mailto:philmd@linaro.org">&lt;philmd@linaro.org&gt;</a>
> 
> commit 69779192acfeb9480183fd076be7480de56b1009
>      Signed-off-by: Philippe Mathieu-Daudé <a class="moz-txt-link-rfc2396E" href="mailto:philmd@linaro.org">&lt;philmd@linaro.org&gt;</a>
> 
> commit f983e598e5a4eada5bfa4731c9db9fba1943e4e6
>      Suggested-by: Richard Henderson <a class="moz-txt-link-rfc2396E" href="mailto:richard.henderson@linaro.org">&lt;richard.henderson@linaro.org&gt;</a>
>      Signed-off-by: Philippe Mathieu-Daudé <a class="moz-txt-link-rfc2396E" href="mailto:philmd@linaro.org">&lt;philmd@linaro.org&gt;</a>
> 
> Please stop that :)

The original patch looks fine:
https://lore.kernel.org/qemu-devel/20221213111707.34921-7-philmd@linaro.org/

Michael, did you change something in your workflow?