From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1035196AbdAISiF (ORCPT ); Mon, 9 Jan 2017 13:38:05 -0500 Received: from mail-qk0-f179.google.com ([209.85.220.179]:33253 "EHLO mail-qk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030597AbdAISiA (ORCPT ); Mon, 9 Jan 2017 13:38:00 -0500 MIME-Version: 1.0 In-Reply-To: References: <8e2accf5-90b3-6bd0-2abd-699927bc459b@users.sourceforge.net> From: Linus Walleij Date: Mon, 9 Jan 2017 19:37:58 +0100 Message-ID: Subject: Re: [PATCH 8/8] mmc-core: Use kmalloc_array() in mmc_alloc_sg() To: SF Markus Elfring Cc: "linux-mmc@vger.kernel.org" , Adrian Hunter , Harjani Ritesh , Jens Axboe , Mike Christie , Shawn Lin , Ulf Hansson , Wolfram Sang , LKML , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 8, 2017 at 10:55 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 8 Jan 2017 22:10:40 +0100 > > * 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. > > Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Date: Mon, 09 Jan 2017 18:37:58 +0000 Subject: Re: [PATCH 8/8] mmc-core: Use kmalloc_array() in mmc_alloc_sg() Message-Id: List-Id: References: <8e2accf5-90b3-6bd0-2abd-699927bc459b@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: "linux-mmc@vger.kernel.org" , Adrian Hunter , Harjani Ritesh , Jens Axboe , Mike Christie , Shawn Lin , Ulf Hansson , Wolfram Sang , LKML , kernel-janitors@vger.kernel.org On Sun, Jan 8, 2017 at 10:55 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 8 Jan 2017 22:10:40 +0100 > > * 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. > > Signed-off-by: Markus Elfring Reviewed-by: Linus Walleij Yours, Linus Walleij