Message ID | 20181219191756.57973-3-mimu@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM: s390: make use of the GIB | expand |
On Wed, 19 Dec 2018 20:17:43 +0100 Michael Mueller <mimu@linux.ibm.com> wrote: > The change hepls to reduce line length and s/hepls/helps/ > icreases code readability. s/icreases/increases/ > > Signed-off-by: Michael Mueller <mimu@linux.ibm.com> > --- > arch/s390/kvm/interrupt.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > Reviewed-by: Cornelia Huck <cohuck@redhat.com>
On 19/12/2018 20:17, Michael Mueller wrote: > The change hepls to reduce line length and > icreases code readability. > > Signed-off-by: Michael Mueller <mimu@linux.ibm.com> > --- > arch/s390/kvm/interrupt.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c > index fcb55b02990e..9a3aed608914 100644 > --- a/arch/s390/kvm/interrupt.c > +++ b/arch/s390/kvm/interrupt.c > @@ -2886,20 +2886,20 @@ int kvm_s390_get_irq_state(struct kvm_vcpu *vcpu, __u8 __user *buf, int len) > > void kvm_s390_gisa_clear(struct kvm *kvm) > { > - if (kvm->arch.gisa) { > - memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_gisa)); > - kvm->arch.gisa->next_alert = (u32)(u64)kvm->arch.gisa; > - VM_EVENT(kvm, 3, "gisa 0x%pK cleared", kvm->arch.gisa); > - } > + if (!kvm->arch.gisa) > + return; > + memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_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) > { > - if (css_general_characteristics.aiv) { > - kvm->arch.gisa = &kvm->arch.sie_page2->gisa; > - VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); > - kvm_s390_gisa_clear(kvm); > - } > + if (!css_general_characteristics.aiv) > + return; > + kvm->arch.gisa = &kvm->arch.sie_page2->gisa; > + VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); to be annoying, shouldn't the trace be done after the clear? > + kvm_s390_gisa_clear(kvm); > } > > void kvm_s390_gisa_destroy(struct kvm *kvm) > Reviewed-by: Pierre Morel<pmorel@linux.ibm.com>
On 02.01.19 17:50, Pierre Morel wrote: > On 19/12/2018 20:17, Michael Mueller wrote: >> The change hepls to reduce line length and >> icreases code readability. >> >> Signed-off-by: Michael Mueller <mimu@linux.ibm.com> >> --- >> arch/s390/kvm/interrupt.c | 20 ++++++++++---------- >> 1 file changed, 10 insertions(+), 10 deletions(-) >> >> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c >> index fcb55b02990e..9a3aed608914 100644 >> --- a/arch/s390/kvm/interrupt.c >> +++ b/arch/s390/kvm/interrupt.c >> @@ -2886,20 +2886,20 @@ int kvm_s390_get_irq_state(struct kvm_vcpu >> *vcpu, __u8 __user *buf, int len) >> void kvm_s390_gisa_clear(struct kvm *kvm) >> { >> - if (kvm->arch.gisa) { >> - memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_gisa)); >> - kvm->arch.gisa->next_alert = (u32)(u64)kvm->arch.gisa; >> - VM_EVENT(kvm, 3, "gisa 0x%pK cleared", kvm->arch.gisa); >> - } >> + if (!kvm->arch.gisa) >> + return; >> + memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_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) >> { >> - if (css_general_characteristics.aiv) { >> - kvm->arch.gisa = &kvm->arch.sie_page2->gisa; >> - VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); >> - kvm_s390_gisa_clear(kvm); >> - } >> + if (!css_general_characteristics.aiv) >> + return; >> + kvm->arch.gisa = &kvm->arch.sie_page2->gisa; >> + VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); > > to be annoying, shouldn't the trace be done after the clear? sure, I will address that > >> + kvm_s390_gisa_clear(kvm); >> } >> void kvm_s390_gisa_destroy(struct kvm *kvm) >> > > Reviewed-by: Pierre Morel<pmorel@linux.ibm.com> > > --
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index fcb55b02990e..9a3aed608914 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -2886,20 +2886,20 @@ int kvm_s390_get_irq_state(struct kvm_vcpu *vcpu, __u8 __user *buf, int len) void kvm_s390_gisa_clear(struct kvm *kvm) { - if (kvm->arch.gisa) { - memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_gisa)); - kvm->arch.gisa->next_alert = (u32)(u64)kvm->arch.gisa; - VM_EVENT(kvm, 3, "gisa 0x%pK cleared", kvm->arch.gisa); - } + if (!kvm->arch.gisa) + return; + memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_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) { - if (css_general_characteristics.aiv) { - kvm->arch.gisa = &kvm->arch.sie_page2->gisa; - VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); - kvm_s390_gisa_clear(kvm); - } + if (!css_general_characteristics.aiv) + return; + kvm->arch.gisa = &kvm->arch.sie_page2->gisa; + VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); + kvm_s390_gisa_clear(kvm); } void kvm_s390_gisa_destroy(struct kvm *kvm)
The change hepls to reduce line length and icreases code readability. Signed-off-by: Michael Mueller <mimu@linux.ibm.com> --- arch/s390/kvm/interrupt.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)