提交 672128bf 编写于 作者: M Michael Mueller 提交者: Christian Borntraeger

KVM: s390: coding style kvm_s390_gisa_init/clear()

The change helps to reduce line length and
increases code readability.
Signed-off-by: NMichael Mueller <mimu@linux.ibm.com>
Reviewed-by: NCornelia Huck <cohuck@redhat.com>
Reviewed-by: NPierre Morel <pmorel@linux.ibm.com>
Reviewed-by: NHalil Pasic <pasic@linux.ibm.com>
Message-Id: <20190131085247.13826-5-mimu@linux.ibm.com>
Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
上级 246b7218
...@@ -2885,20 +2885,20 @@ int kvm_s390_get_irq_state(struct kvm_vcpu *vcpu, __u8 __user *buf, int len) ...@@ -2885,20 +2885,20 @@ int kvm_s390_get_irq_state(struct kvm_vcpu *vcpu, __u8 __user *buf, int len)
void kvm_s390_gisa_clear(struct kvm *kvm) void kvm_s390_gisa_clear(struct kvm *kvm)
{ {
if (kvm->arch.gisa) { if (!kvm->arch.gisa)
memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_gisa)); return;
kvm->arch.gisa->next_alert = (u32)(u64)kvm->arch.gisa; memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_gisa));
VM_EVENT(kvm, 3, "gisa 0x%pK cleared", kvm->arch.gisa); kvm->arch.gisa->next_alert = (u32)(u64)kvm->arch.gisa;
} VM_EVENT(kvm, 3, "gisa 0x%pK cleared", kvm->arch.gisa);
} }
void kvm_s390_gisa_init(struct kvm *kvm) void kvm_s390_gisa_init(struct kvm *kvm)
{ {
if (css_general_characteristics.aiv) { if (!css_general_characteristics.aiv)
kvm->arch.gisa = &kvm->arch.sie_page2->gisa; return;
VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); kvm->arch.gisa = &kvm->arch.sie_page2->gisa;
kvm_s390_gisa_clear(kvm); kvm_s390_gisa_clear(kvm);
} VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa);
} }
void kvm_s390_gisa_destroy(struct kvm *kvm) void kvm_s390_gisa_destroy(struct kvm *kvm)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部