KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device() initialized and assigned, it is used after assignment be initialized and assigned, it is first allocated a memory address
Used to reduce a movq instruction.
Reviewed-by Sean Christopherson <[email protected]>
Signed-off-by Li kunyu <[email protected]>
--- virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
virt/kvm/kvm_main.c +1 -1
@@ -4378,7 +4378,7 @@ void kvm_unregister_device_ops(u32 type)static int kvm_ioctl_create_device (struct kvm *kvm,struct kvm_create_device *cd) { -const struct kvm_device_ops *ops =NULL ; +const struct kvm_device_ops *ops;struct kvm_device *dev;bool test = cd->flags &KVM_CREATE_DEVICE_TEST ;int type;
Signature · 1 line
2.18.2
PATCH v2 1/1 KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device() initialized and assigned, it is used after assignment
Used to reduce a movq instruction.
Reviewed-by Sean Christopherson <[email protected]>
Signed-off-by Li kunyu <[email protected]>
v2:
Change patch title.
--- virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
virt/kvm/kvm_main.c +1 -1
@@ -4378,7 +4378,7 @@ void kvm_unregister_device_ops(u32 type)static int kvm_ioctl_create_device (struct kvm *kvm,struct kvm_create_device *cd) { -const struct kvm_device_ops *ops =NULL ; +const struct kvm_device_ops *ops;struct kvm_device *dev;bool test = cd->flags &KVM_CREATE_DEVICE_TEST ;int type;
Signature · 1 line
2.18.2
Re: [PATCH v2] KVM: Drop unnecessary initialization of "ops" in kvm_ioctl_create_device() initialized and assigned, it is used after assignment
Queued, thanks.
Paolo