From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Date: Thu, 25 Aug 2016 16:10:09 +0000 Subject: Re: [PATCH v2 1/2] KVM: s390: Improve determination of sizes in kvm_s390_import_bp_data() Message-Id: <20160825181009.381411d9.cornelia.huck@de.ibm.com> List-Id: References: <82b84c9c-38a4-4d17-910f-312668dbae01@users.sourceforge.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: SF Markus Elfring Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, Christian =?UTF-8?B?Qm9ybnRyw6RnZXI=?= , David Hildenbrand , Heiko Carstens , Martin Schwidefsky , Paolo Bonzini , Radim =?UTF-8?B?S3LEjW3DocWZ?= , LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Walter Harms On Wed, 24 Aug 2016 20:36:26 +0200 SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 24 Aug 2016 19:45:23 +0200 > > * 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 > > This issue was detected also by using the Coccinelle software. Do you have the scripts you use published somewhere? > > * 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. I think your description is a bit on the verbose side, but not enough to gripe more. > > Signed-off-by: Markus Elfring > --- > > v2: Rebased on source files from "Linux next-20160824". > Advices were integrated from source code review. > > arch/s390/kvm/guestdbg.c | 25 +++++++++++++++---------- > 1 file changed, 15 insertions(+), 10 deletions(-) Acked-by: Cornelia Huck