From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932164AbcIEHw4 (ORCPT ); Mon, 5 Sep 2016 03:52:56 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:37031 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754757AbcIEHww (ORCPT ); Mon, 5 Sep 2016 03:52:52 -0400 Date: Mon, 5 Sep 2016 09:52:39 +0200 From: Peter Zijlstra To: SF Markus Elfring Cc: x86@kernel.org, Borislav Petkov , "H. Peter Anvin" , Ingo Molnar , Richard Cochran , Stephane Eranian , Thomas Gleixner , Tony Luck , Vikas Shivappa , LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Paolo Bonzini Subject: Re: [PATCH 1/4] perf/x86/cqm: Use kmalloc_array() in intel_mbm_init() Message-ID: <20160905075239.GR10153@twins.programming.kicks-ass.net> References: <566ABCD9.1060404@users.sourceforge.net> <9d893198-dd12-14a8-74bd-02fc42de4bf4@users.sourceforge.net> 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 07:54:47PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 4 Sep 2016 17:28:13 +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. Again, lack of actual reason..