Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467995

Re: [PATCH 3/4] KVM-S390: Less function calls in kvm_s390_import_bp_data() after error detection

From Cornelia Huck <cornelia.huck@de.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/4] KVM-S390: Less function calls in kvm_s390_import_bp_data() after error detection
Date 2016-08-22 21:40 +0200
Message-ID <s93eF-26x-5@gated-at.bofh.it> (permalink)
References <s7drP-4Al-9@gated-at.bofh.it> <s7dBw-4DV-19@gated-at.bofh.it> <s8X9g-6I9-29@gated-at.bofh.it> <s90JQ-my-19@gated-at.bofh.it>
Organization IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294

Show all headers | View raw


On Mon, 22 Aug 2016 18:56:47 +0200
SF Markus Elfring <elfring@users.sourceforge.net> wrote:

> >> @@ -273,10 +273,12 @@ int kvm_s390_import_bp_data(struct kvm_vcpu *vcpu,
> >>  	vcpu->arch.guestdbg.nr_hw_wp = nr_wp;
> >>  	vcpu->arch.guestdbg.hw_wp_info = wp_info;
> >>  	return 0;
> >> -error:
> >> -	kfree(bp_data);
> >> -	kfree(wp_info);
> >> +free_bp_info:
> >>  	kfree(bp_info);
> >> +free_wp_info:
> >> +	kfree(wp_info);
> >> +free_bp_data:
> >> +	kfree(bp_data);
> >>  	return ret;
> >>  }
> >>
> > 
> > This replaces a perfectly fine fallthrough
> 
> The usage of a single goto label like "error" seems to be convenient.
> But how do these habits fit to the current Linux coding style convention?
> 
> 
> > with some horrible labels.
> 
> Do they explain better which processing steps should be performed
> for an efficient exception handling in this function implementation?

*sigh*

It's _exception handling_. It does not need to be "efficient", it needs
to be easily parsable by humans. If in doubt, the compiler will be
_much_ better at optimizing that kind of stuff anyway.

So still NACK.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] KVM-S390: Fine-tuning for kvm_s390_import_bp_data() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-17 20:10 +0200
  [PATCH 2/4] KVM-S390: Use memdup_user() rather than duplicating its  implementation SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-17 20:20 +0200
    Re: [PATCH 2/4] KVM-S390: Use memdup_user() rather than duplicating  its implementation Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-08-22 15:10 +0200
    Re: [PATCH 2/4] KVM-S390: Use memdup_user() rather than duplicating  its implementation David Hildenbrand <dahi@linux.vnet.ibm.com> - 2016-08-22 15:10 +0200
    Re: [PATCH 2/4] KVM-S390: Use memdup_user() rather than duplicating  its implementation Christian Borntraeger <borntraeger@de.ibm.com> - 2016-08-24 17:20 +0200
      [PATCH v2 0/2] KVM: s390: Fine-tuning for kvm_s390_import_bp_data() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-24 20:40 +0200
        [PATCH v2 1/2] KVM: s390: Improve determination of sizes in  kvm_s390_import_bp_data() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-24 20:50 +0200
        [PATCH v2 2/2] KVM: s390: Use memdup_user() rather than duplicating  code SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-24 20:50 +0200
  [PATCH 3/4] KVM-S390: Less function calls in  kvm_s390_import_bp_data() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-17 20:20 +0200
    Re: [PATCH 3/4] KVM-S390: Less function calls in  kvm_s390_import_bp_data() after error detection David Hildenbrand <dahi@linux.vnet.ibm.com> - 2016-08-22 15:00 +0200
    Re: [PATCH 3/4] KVM-S390: Less function calls in  kvm_s390_import_bp_data() after error detection Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-08-22 15:10 +0200
      Re: [PATCH 3/4] KVM-S390: Less function calls in  kvm_s390_import_bp_data() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-22 19:00 +0200
        Re: [PATCH 3/4] KVM-S390: Less function calls in  kvm_s390_import_bp_data() after error detection Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-08-22 21:40 +0200
          Re: [PATCH 3/4] KVM-S390: Less function calls in  kvm_s390_import_bp_data() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-22 23:20 +0200
            Re: [PATCH 3/4] KVM-S390: Less function calls in  kvm_s390_import_bp_data() after error detection Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-08-22 23:30 +0200
    Re: [PATCH 3/4] KVM-S390: Less function calls in  kvm_s390_import_bp_data() after error detection Christian Borntraeger <borntraeger@de.ibm.com> - 2016-08-24 17:20 +0200
  [PATCH 4/4] KVM-S390: Delete an unnecessary initialisation for a  buffer variable SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-17 20:20 +0200
    Re: [PATCH 4/4] KVM-S390: Delete an unnecessary initialisation for  a buffer variable Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-08-22 15:10 +0200
    Re: [PATCH 4/4] KVM-S390: Delete an unnecessary initialisation for  a buffer variable David Hildenbrand <dahi@linux.vnet.ibm.com> - 2016-08-22 15:10 +0200
  [PATCH 1/4] KVM-S390: Improve determination of sizes in  kvm_s390_import_bp_data() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-17 20:20 +0200
    Re: [PATCH 1/4] KVM-S390: Improve determination of sizes in kvm_s390_import_bp_data() walter harms <wharms@bfs.de> - 2016-08-18 09:30 +0200
      Re: [PATCH 1/4] KVM-S390: Improve determination of sizes in  kvm_s390_import_bp_data() Julia Lawall <julia.lawall@lip6.fr> - 2016-08-18 11:10 +0200
        Re: [PATCH 1/4] KVM-S390: Improve determination of sizes in  kvm_s390_import_bp_data() Paolo Bonzini <pbonzini@redhat.com> - 2016-08-18 12:10 +0200
          Re: [PATCH 1/4] KVM-S390: Improve determination of sizes in kvm_s390_import_bp_data() walter harms <wharms@bfs.de> - 2016-08-18 13:00 +0200
            Re: [PATCH 1/4] KVM-S390: Improve determination of sizes in  kvm_s390_import_bp_data() Paolo Bonzini <pbonzini@redhat.com> - 2016-08-18 13:10 +0200
              Re: [PATCH 1/4] KVM-S390: Improve determination of sizes in  kvm_s390_import_bp_data() Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-08-22 15:00 +0200
          Re: Replacing specific kmalloc() calls by kmalloc_array()? SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-24 14:20 +0200
            Re: Replacing specific kmalloc() calls by kmalloc_array()? Paolo Bonzini <pbonzini@redhat.com> - 2016-08-24 17:10 +0200

csiph-web