From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754703AbcIEHwE (ORCPT ); Mon, 5 Sep 2016 03:52:04 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:36346 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031AbcIEHwD (ORCPT ); Mon, 5 Sep 2016 03:52:03 -0400 Date: Mon, 5 Sep 2016 09:51:49 +0200 From: Peter Zijlstra To: SF Markus Elfring Cc: x86@kernel.org, Alexander Shishkin , Arnaldo Carvalho de Melo , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Paolo Bonzini Subject: Re: [PATCH] perf/x86: Use kmalloc_array() in merge_attr() Message-ID: <20160905075149.GQ10153@twins.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 04, 2016 at 11:00:15AM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 4 Sep 2016 10:45:20 +0200 > > * A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding function "kmalloc_array". > > This issue was detected by using the Coccinelle software. > > * Replace the specification of a data structure by a pointer dereference > to make the corresponding size determination a bit safer according to > the Linux coding style convention. Why!?