[libvirt PATCH 00/10] Unused cleanups

Ján Tomko posted 10 patches 1 month, 2 weeks ago
src/qemu/qemu_cgroup.c           |   2 -
src/qemu/qemu_command.c          | 110 +++++++++++++------------------
src/qemu/qemu_driver.c           |   1 -
src/qemu/qemu_hotplug.c          |   1 -
src/qemu/qemu_monitor_json.c     |   1 -
src/qemu/qemu_validate.c         |   3 +-
src/security/security_apparmor.c |   1 -
src/vmx/vmx.c                    |   2 -
tools/virsh-domain.c             |   1 -
tools/virsh-host.c               |   2 -
tools/vsh.c                      |   7 --
11 files changed, 48 insertions(+), 83 deletions(-)
[libvirt PATCH 00/10] Unused cleanups
Posted by Ján Tomko 1 month, 2 weeks ago
Patches 4-9/10 all depend on patch 3/10
10/10 can be pushed independently

Ján Tomko (10):
  qemu: seccomp sandbox: remove incorect G_GNUC_UNUSED marker
  qemu: validate: fs: remove unneeded parameter
  qemu: remove qemuCaps from qemuBuildObjectCommandlineFromJSON
  qemu: remove qemuCaps from qemuBuildObjectSecretCommandLine
  qemu: remove qemuCaps from qemuBuildTLSx509CommandLine
  qemu: remove qemuCaps from qemuBuildObjectCommandline
  qemu: remove qemuCaps from qemuBuildIOThreadCommandLine
  qemu: remove unused vm from qemuBuildSEVSNPCommandLine
  qemu: remove unused vm from qemuBuildPVCommandLine
  Remove unreachable breaks right after return

 src/qemu/qemu_cgroup.c           |   2 -
 src/qemu/qemu_command.c          | 110 +++++++++++++------------------
 src/qemu/qemu_driver.c           |   1 -
 src/qemu/qemu_hotplug.c          |   1 -
 src/qemu/qemu_monitor_json.c     |   1 -
 src/qemu/qemu_validate.c         |   3 +-
 src/security/security_apparmor.c |   1 -
 src/vmx/vmx.c                    |   2 -
 tools/virsh-domain.c             |   1 -
 tools/virsh-host.c               |   2 -
 tools/vsh.c                      |   7 --
 11 files changed, 48 insertions(+), 83 deletions(-)

-- 
2.48.1
Re: [libvirt PATCH 00/10] Unused cleanups
Posted by Peter Krempa 1 month, 2 weeks ago
On Thu, Mar 13, 2025 at 16:30:14 +0100, Ján Tomko wrote:
> Patches 4-9/10 all depend on patch 3/10
> 10/10 can be pushed independently
> 
> Ján Tomko (10):
>   qemu: seccomp sandbox: remove incorect G_GNUC_UNUSED marker
>   qemu: validate: fs: remove unneeded parameter
>   qemu: remove qemuCaps from qemuBuildObjectCommandlineFromJSON
>   qemu: remove qemuCaps from qemuBuildObjectSecretCommandLine
>   qemu: remove qemuCaps from qemuBuildTLSx509CommandLine
>   qemu: remove qemuCaps from qemuBuildObjectCommandline
>   qemu: remove qemuCaps from qemuBuildIOThreadCommandLine
>   qemu: remove unused vm from qemuBuildSEVSNPCommandLine
>   qemu: remove unused vm from qemuBuildPVCommandLine
>   Remove unreachable breaks right after return

With the two docs things fixed:

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Re: [libvirt PATCH 00/10] Unused cleanups
Posted by Martin Kletzander 1 month, 2 weeks ago
On Thu, Mar 13, 2025 at 04:30:14PM +0100, Ján Tomko wrote:
>Patches 4-9/10 all depend on patch 3/10
>10/10 can be pushed independently
>
>Ján Tomko (10):
>  qemu: seccomp sandbox: remove incorect G_GNUC_UNUSED marker
>  qemu: validate: fs: remove unneeded parameter
>  qemu: remove qemuCaps from qemuBuildObjectCommandlineFromJSON
>  qemu: remove qemuCaps from qemuBuildObjectSecretCommandLine
>  qemu: remove qemuCaps from qemuBuildTLSx509CommandLine
>  qemu: remove qemuCaps from qemuBuildObjectCommandline
>  qemu: remove qemuCaps from qemuBuildIOThreadCommandLine
>  qemu: remove unused vm from qemuBuildSEVSNPCommandLine
>  qemu: remove unused vm from qemuBuildPVCommandLine
>  Remove unreachable breaks right after return
>

I wonder whether there was some tool that got confused by return without
break in a switch statement, but in any case that's a problem of that
tool, if such thing exists.

For the series:

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>

> src/qemu/qemu_cgroup.c           |   2 -
> src/qemu/qemu_command.c          | 110 +++++++++++++------------------
> src/qemu/qemu_driver.c           |   1 -
> src/qemu/qemu_hotplug.c          |   1 -
> src/qemu/qemu_monitor_json.c     |   1 -
> src/qemu/qemu_validate.c         |   3 +-
> src/security/security_apparmor.c |   1 -
> src/vmx/vmx.c                    |   2 -
> tools/virsh-domain.c             |   1 -
> tools/virsh-host.c               |   2 -
> tools/vsh.c                      |   7 --
> 11 files changed, 48 insertions(+), 83 deletions(-)
>
>-- 
>2.48.1
>
Re: [libvirt PATCH 00/10] Unused cleanups
Posted by Daniel P. Berrangé 1 month, 2 weeks ago
On Thu, Mar 13, 2025 at 04:52:13PM +0100, Martin Kletzander wrote:
> On Thu, Mar 13, 2025 at 04:30:14PM +0100, Ján Tomko wrote:
> > Patches 4-9/10 all depend on patch 3/10
> > 10/10 can be pushed independently
> > 
> > Ján Tomko (10):
> >  qemu: seccomp sandbox: remove incorect G_GNUC_UNUSED marker
> >  qemu: validate: fs: remove unneeded parameter
> >  qemu: remove qemuCaps from qemuBuildObjectCommandlineFromJSON
> >  qemu: remove qemuCaps from qemuBuildObjectSecretCommandLine
> >  qemu: remove qemuCaps from qemuBuildTLSx509CommandLine
> >  qemu: remove qemuCaps from qemuBuildObjectCommandline
> >  qemu: remove qemuCaps from qemuBuildIOThreadCommandLine
> >  qemu: remove unused vm from qemuBuildSEVSNPCommandLine
> >  qemu: remove unused vm from qemuBuildPVCommandLine
> >  Remove unreachable breaks right after return
> > 
> 
> I wonder whether there was some tool that got confused by return without
> break in a switch statement, but in any case that's a problem of that
> tool, if such thing exists.

Probably a case where we did

  ret = ....

and then did a simple search & replace for 's/ret = /return/', when we
eliminated the need for a centralize return path thanks to g_auto*




With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Re: [libvirt PATCH 00/10] Unused cleanups
Posted by Martin Kletzander 1 month, 2 weeks ago
On Thu, Mar 13, 2025 at 03:59:07PM +0000, Daniel P. Berrangé wrote:
>On Thu, Mar 13, 2025 at 04:52:13PM +0100, Martin Kletzander wrote:
>> On Thu, Mar 13, 2025 at 04:30:14PM +0100, Ján Tomko wrote:
>> > Patches 4-9/10 all depend on patch 3/10
>> > 10/10 can be pushed independently
>> >
>> > Ján Tomko (10):
>> >  qemu: seccomp sandbox: remove incorect G_GNUC_UNUSED marker
>> >  qemu: validate: fs: remove unneeded parameter
>> >  qemu: remove qemuCaps from qemuBuildObjectCommandlineFromJSON
>> >  qemu: remove qemuCaps from qemuBuildObjectSecretCommandLine
>> >  qemu: remove qemuCaps from qemuBuildTLSx509CommandLine
>> >  qemu: remove qemuCaps from qemuBuildObjectCommandline
>> >  qemu: remove qemuCaps from qemuBuildIOThreadCommandLine
>> >  qemu: remove unused vm from qemuBuildSEVSNPCommandLine
>> >  qemu: remove unused vm from qemuBuildPVCommandLine
>> >  Remove unreachable breaks right after return
>> >
>>
>> I wonder whether there was some tool that got confused by return without
>> break in a switch statement, but in any case that's a problem of that
>> tool, if such thing exists.
>
>Probably a case where we did
>
>  ret = ....
>
>and then did a simple search & replace for 's/ret = /return/', when we
>eliminated the need for a centralize return path thanks to g_auto*
>

Yeah, probably that.

>
>
>
>With regards,
>Daniel
>-- 
>|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
>|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
>|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
>