From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760135AbcHYQKY (ORCPT ); Thu, 25 Aug 2016 12:10:24 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:28517 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754123AbcHYQKS (ORCPT ); Thu, 25 Aug 2016 12:10:18 -0400 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: cornelia.huck@de.ibm.com X-IBM-RcptTo: kernel-janitors@vger.kernel.org;kvm@vger.kernel.org;linux-kernel@vger.kernel.org;linux-s390@vger.kernel.org Date: Thu, 25 Aug 2016 18:10:09 +0200 From: Cornelia Huck 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 Subject: Re: [PATCH v2 1/2] KVM: s390: Improve determination of sizes in kvm_s390_import_bp_data() In-Reply-To: References: <82b84c9c-38a4-4d17-910f-312668dbae01@users.sourceforge.net> Organization: IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz =?UTF-8?B?R2VzY2jDpGZ0c2bDvGhydW5nOg==?= Dirk Wittkopp Sitz der Gesellschaft: =?UTF-8?B?QsO2Ymxpbmdlbg==?= Registergericht: Amtsgericht Stuttgart, HRB 243294 X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16082516-0016-0000-0000-00000225442A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16082516-0017-0000-0000-000022BF8C2D Message-Id: <20160825181009.381411d9.cornelia.huck@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-25_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608250190 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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