
On Fri, Nov 20, 2015 at 09:42:43AM -0500, John Ferlan wrote:
On 11/20/2015 05:04 AM, Ján Tomko wrote:
The domain definition is not needed in any of these functions. Only pass it to qemuSetupChardevCgroup, which is used as a callback for virDomainChrDefForeach.
Use the right type for passing virDomainObjPtr instead of void* where possible. --- src/qemu/qemu_cgroup.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-)
...
@@ -585,10 +583,7 @@ qemuSetupDevicesCgroup(virQEMUDriverPtr driver, vm) < 0) goto cleanup;
- if (vm->def->tpm && - (qemuSetupTPMCgroup(vm->def, - vm->def->tpm, - vm) < 0)) + if (vm->def->tpm && qemuSetupTPMCgroup(vm, vm->def->tpm) < 0)
Why not just pass "vm"... qemuSetupTPMCgroup could easily deref "->def->tpm)"
ACK - your call if you want to keep/remove the 2nd parameter.
Thanks. I removed the second parameter as well and pushed the series. Jan
John
goto cleanup;
for (i = 0; i < vm->def->nhostdevs; i++) {