On 11/11/25 16:01, Kirill Shchetiniuk via Devel wrote:
> Refactored the code to use GLib automatic memory management capabilities.
> Added macros to enable the g_autoptr capability for some structures.
> Removed prevosly defined cleanup stages, as now it is not required.
> Moved some variables to closer scope, to enbale auto memory management
> capability for some variables.
>
> Kirill Shchetiniuk (7):
> conf: Use automatic memory management
> qemu: Use automatic memory management
> virQEMUCapsKVMSupportsNesting: Use automatic memory management
> qemuDomainSetVcpusAgent: Use automatic memory management
> qemuDomainGetHostnameLease: Use automatic memory management
> qemuProcessRefreshChannelVirtioState: Use automatic memory management
> qemuMigrationSrcPerformPeer2Peer2: Use automatic memory management
>
> src/conf/domain_conf.c | 35 +++++++++++++-------------------
> src/conf/domain_conf.h | 2 ++
> src/datatypes.h | 1 +
> src/qemu/qemu_capabilities.c | 6 +++---
> src/qemu/qemu_domain.c | 15 ++++++--------
> src/qemu/qemu_driver.c | 33 +++++++++++-------------------
> src/qemu/qemu_migration.c | 39 +++++++++++++-----------------------
> src/qemu/qemu_monitor.c | 6 ++----
> src/qemu/qemu_process.c | 7 +++----
> 9 files changed, 57 insertions(+), 87 deletions(-)
>
code-wise, there's nothing wrong with patches, but I don't quite
understand the split. I mean, in patches 3-7 you do one function at time
which is okay. But then in patches 1-2 you pick up some (what looks
random) functions that have not much in common.
The way we usually do this kind of change is:
a) you change whole file at once; this is acceptable for very small
files (not on the biggest file in our repo).
b) one function at once (just like you're doing in patches 2-7),
c) one 'type' at once (say, you eliminate calls to virWhateverFree()) in
ALL files possible).
As usual, git log usually shows practice we use. Can you please split
your change differently and resend?
Michal