[PATCH 0/9] reduce code duplication in NodeDevice driver

Daniel Henrique Barboza posted 9 patches 3 years, 1 month ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210201114642.1947595-1-danielhb413@gmail.com
There is a newer version of this series
src/datatypes.h                |   2 +
src/hypervisor/domain_driver.c | 147 +++++++++++++++++++++++++++++
src/hypervisor/domain_driver.h |  11 +++
src/hypervisor/meson.build     |   1 +
src/libvirt_private.syms       |   3 +
src/libxl/libxl_driver.c       | 164 +++------------------------------
src/qemu/qemu_driver.c         | 164 ++++-----------------------------
7 files changed, 192 insertions(+), 300 deletions(-)
[PATCH 0/9] reduce code duplication in NodeDevice driver
Posted by Daniel Henrique Barboza 3 years, 1 month ago
Hi,

This series reduces code duplication between qemu_driver.c and
libxl_driver.c by adding common code, related to NodeDevicePtr
driver functions, into helper functions in domain_driver.c.

No functional change was made.


Daniel Henrique Barboza (9):
  qemu, libxl, hypervisor: use virDomainDriverNodeDeviceReset() helper
  datatypes.h: register AUTOPTR_CLEANUP_FUNC for virNodeDevicePtr
  domain_driver.c: use g_auto* in virDomainDriverNodeDeviceReset()
  qemu, libxl, hypervisor: use virDomainDriverNodeDeviceReAttach()
    helper
  domain_driver.c: use g_auto* in virDomainDriverNodeDeviceReAttach()
  libxl_driver.c: validate 'driverName' earlier in
    libxlNodeDeviceDetachFlags()
  qemu_driver.c: validate 'driverName' earlier in
    qemuNodeDeviceDetachFlags()
  qemu, libxl, hypervisor: use virDomainDriverNodeDeviceDetachFlags()
    helper
  domain_driver.c: use g_auto* in virDomainDriverNodeDeviceDetachFlags()

 src/datatypes.h                |   2 +
 src/hypervisor/domain_driver.c | 147 +++++++++++++++++++++++++++++
 src/hypervisor/domain_driver.h |  11 +++
 src/hypervisor/meson.build     |   1 +
 src/libvirt_private.syms       |   3 +
 src/libxl/libxl_driver.c       | 164 +++------------------------------
 src/qemu/qemu_driver.c         | 164 ++++-----------------------------
 7 files changed, 192 insertions(+), 300 deletions(-)

-- 
2.26.2

Re: [PATCH 0/9] reduce code duplication in NodeDevice driver
Posted by Ján Tomko 3 years, 1 month ago
On a Monday in 2021, Daniel Henrique Barboza wrote:
>Hi,
>
>This series reduces code duplication between qemu_driver.c and
>libxl_driver.c by adding common code, related to NodeDevicePtr
>driver functions, into helper functions in domain_driver.c.
>
>No functional change was made.
>
>
>Daniel Henrique Barboza (9):
>  qemu, libxl, hypervisor: use virDomainDriverNodeDeviceReset() helper
>  datatypes.h: register AUTOPTR_CLEANUP_FUNC for virNodeDevicePtr
>  domain_driver.c: use g_auto* in virDomainDriverNodeDeviceReset()
>  qemu, libxl, hypervisor: use virDomainDriverNodeDeviceReAttach()
>    helper
>  domain_driver.c: use g_auto* in virDomainDriverNodeDeviceReAttach()
>  libxl_driver.c: validate 'driverName' earlier in
>    libxlNodeDeviceDetachFlags()
>  qemu_driver.c: validate 'driverName' earlier in
>    qemuNodeDeviceDetachFlags()
>  qemu, libxl, hypervisor: use virDomainDriverNodeDeviceDetachFlags()
>    helper
>  domain_driver.c: use g_auto* in virDomainDriverNodeDeviceDetachFlags()
>
> src/datatypes.h                |   2 +
> src/hypervisor/domain_driver.c | 147 +++++++++++++++++++++++++++++
> src/hypervisor/domain_driver.h |  11 +++
> src/hypervisor/meson.build     |   1 +
> src/libvirt_private.syms       |   3 +
> src/libxl/libxl_driver.c       | 164 +++------------------------------
> src/qemu/qemu_driver.c         | 164 ++++-----------------------------
> 7 files changed, 192 insertions(+), 300 deletions(-)
>

To what is in here:
Reviewed-by: Ján Tomko <jtomko@redhat.com>

But before this series is merged, a change to the list of files for
checking ACL calls is needed.

Jano