[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/3] virtio: Declare the decoding functions to static
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v3 2/3] virtio: Declare the decoding functions to static |
Date: |
Mon, 19 Feb 2024 16:38:27 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hyman Huang <yong.huang@smartx.com> writes:
> qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features()
> are now only used in virtio-hmp-cmds.c. So move them into there,
> redeclare them to static, and replace the qmp_ prefix with hmp_.
>
> Signed-off-by: Hyman Huang <yong.huang@smartx.com>
> ---
> hw/virtio/meson.build | 3 +-
> hw/virtio/virtio-hmp-cmds.c | 677 +++++++++++++++++++++++++++++++++++-
> hw/virtio/virtio-qmp.c | 661 -----------------------------------
> hw/virtio/virtio-qmp.h | 3 -
> 4 files changed, 670 insertions(+), 674 deletions(-)
>
> diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build
> index 47baf00366..6665669480 100644
> --- a/hw/virtio/meson.build
> +++ b/hw/virtio/meson.build
> @@ -9,7 +9,7 @@ system_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true:
> files('vdpa-dev.c')
>
> specific_virtio_ss = ss.source_set()
> specific_virtio_ss.add(files('virtio.c'))
> -specific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c'))
> +specific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c',
> 'virtio-hmp-cmds.c'))
I think you can also move virtio-qmp.c, i.e.
specific_virtio_ss.add(files('virtio-config-io.c', 'virtio-hmp-cmds.c'))
here, and ...
>
> if have_vhost
> system_virtio_ss.add(files('vhost.c'))
> @@ -74,7 +74,6 @@ specific_virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI',
> if_true: virtio_pci_ss)
> system_ss.add_all(when: 'CONFIG_VIRTIO', if_true: system_virtio_ss)
> system_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c'))
> system_ss.add(when: 'CONFIG_VIRTIO', if_false: files('virtio-stub.c'))
> -system_ss.add(files('virtio-hmp-cmds.c'))
system_ss.add(files('virtio-qmp.c'))
here.
[...]
[PATCH v3 3/3] qapi: Define VhostDeviceProtocols and VirtioDeviceFeatures as plain C types, Hyman Huang, 2024/02/02
[PATCH v3 2/3] virtio: Declare the decoding functions to static, Hyman Huang, 2024/02/02
- Re: [PATCH v3 2/3] virtio: Declare the decoding functions to static,
Markus Armbruster <=
Re: [PATCH v3 0/3] Adjust the output of x-query-virtio-status, Michael S. Tsirkin, 2024/02/13