KVM: s390: Improve determination of sizes in kvm_s390_import_bp_data()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 24 Aug 2016 17:45:23 +0000 (19:45 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 8 Sep 2016 11:40:54 +0000 (13:40 +0200)
commita1708a2eaded836b7fe64e89a137336c0e6244ea
treedae558022be44c3585e4315d922ed6f9c3def0b0
parenta6940674c384ebf56aa0c44f417032de2b67100c
KVM: s390: Improve determination of sizes in kvm_s390_import_bp_data()

* A multiplication for the size determination of a memory allocation
  indicated that an array data structure should be processed.
  Thus reuse the corresponding function "kmalloc_array".

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
  This issue was detected also by using the Coccinelle software.

* Replace the specification of data structures by pointer dereferences
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

* Delete the local variable "size" which became unnecessary with
  this refactoring.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-Id: <c3323f6b-4af2-0bfb-9399-e529952e378e@users.sourceforge.net>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/guestdbg.c