From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753615AbcHVM6U (ORCPT ); Mon, 22 Aug 2016 08:58:20 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46096 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752401AbcHVM6R (ORCPT ); Mon, 22 Aug 2016 08:58:17 -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: Mon, 22 Aug 2016 14:58:07 +0200 From: Cornelia Huck To: Paolo Bonzini Cc: wharms@bfs.de, Julia Lawall , SF Markus Elfring , kvm@vger.kernel.org, linux-s390@vger.kernel.org, Christian =?UTF-8?B?Qm9ybnRyw6RnZXI=?= , David Hildenbrand , Heiko Carstens , Martin Schwidefsky , Radim =?UTF-8?B?S3LEjW3DocWZ?= , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/4] KVM-S390: Improve determination of sizes in kvm_s390_import_bp_data() In-Reply-To: <38bba070-d157-dc49-b428-47768ad647ca@redhat.com> References: <82b84c9c-38a4-4d17-910f-312668dbae01@users.sourceforge.net> <033d8595-d051-1fa8-95b1-5d2056eb5667@users.sourceforge.net> <57B562F3.1080004@bfs.de> <9db1986a-9b93-72ca-f35e-85b5b5e9f351@redhat.com> <57B5935B.3050602@bfs.de> <38bba070-d157-dc49-b428-47768ad647ca@redhat.com> 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: 16082212-0040-0000-0000-000002169A87 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16082212-0041-0000-0000-0000216FC59F Message-Id: <20160822145807.4b8fb1cb.cornelia.huck@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-22_06:,, 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-1608220137 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Aug 2016 12:55:11 +0200 Paolo Bonzini wrote: > This is _not_ premature optimization. (k)calloc tells the reader that > it's safe not to initialize part of the array. kmalloc_array says the > opposite. Using the right function adds important hints in the > code---which unlike comments cannot get stale without also introducing > visible bugs. Ack. I'd accept a patch changing this to use kmalloc_array. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Date: Mon, 22 Aug 2016 12:58:07 +0000 Subject: Re: [PATCH 1/4] KVM-S390: Improve determination of sizes in kvm_s390_import_bp_data() Message-Id: <20160822145807.4b8fb1cb.cornelia.huck@de.ibm.com> List-Id: References: <82b84c9c-38a4-4d17-910f-312668dbae01@users.sourceforge.net> <033d8595-d051-1fa8-95b1-5d2056eb5667@users.sourceforge.net> <57B562F3.1080004@bfs.de> <9db1986a-9b93-72ca-f35e-85b5b5e9f351@redhat.com> <57B5935B.3050602@bfs.de> <38bba070-d157-dc49-b428-47768ad647ca@redhat.com> In-Reply-To: <38bba070-d157-dc49-b428-47768ad647ca@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paolo Bonzini Cc: wharms@bfs.de, Julia Lawall , SF Markus Elfring , kvm@vger.kernel.org, linux-s390@vger.kernel.org, Christian =?UTF-8?B?Qm9ybnRyw6RnZXI=?= , David Hildenbrand , Heiko Carstens , Martin Schwidefsky , Radim =?UTF-8?B?S3LEjW3DocWZ?= , LKML , kernel-janitors@vger.kernel.org On Thu, 18 Aug 2016 12:55:11 +0200 Paolo Bonzini wrote: > This is _not_ premature optimization. (k)calloc tells the reader that > it's safe not to initialize part of the array. kmalloc_array says the > opposite. Using the right function adds important hints in the > code---which unlike comments cannot get stale without also introducing > visible bugs. Ack. I'd accept a patch changing this to use kmalloc_array.