Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752532AbaJPTar (ORCPT ); Thu, 16 Oct 2014 15:30:47 -0400 Received: from top.free-electrons.com ([176.31.233.9]:40802 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752035AbaJPTaq (ORCPT ); Thu, 16 Oct 2014 15:30:46 -0400 Message-ID: <54401CE3.8000307@free-electrons.com> Date: Thu, 16 Oct 2014 21:30:43 +0200 From: Michael Opdenacker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Joe Perches CC: hare@suse.de, JBottomley@parallels.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr Subject: Re: [PATCH] aic7xxx: replace kmalloc/memset by kzalloc References: <1413486878-375-1-git-send-email-michael.opdenacker@free-electrons.com> <1413487720.15773.1.camel@perches.com> In-Reply-To: <1413487720.15773.1.camel@perches.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe, On 10/16/2014 09:28 PM, Joe Perches wrote: > On Thu, 2014-10-16 at 21:14 +0200, Michael Opdenacker wrote: > > > /* Allocate SCB resources */ > - scb_data->scbarray = kmalloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC, GFP_ATOMIC); > + scb_data->scbarray = kzalloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC, > + GFP_ATOMIC); > if (scb_data->scbarray == NULL) > return (ENOMEM); > - memset(scb_data->scbarray, 0, sizeof(struct scb) * AHC_SCB_MAX_ALLOC); > > /* Determine the number of hardware SCBs and initialize them */ > > Probably better as kcalloc. Hey, well spotted! Thanks for your review. I will post a new version soon. Cheers, Michael. > -- Michael Opdenacker, CEO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com +33 484 258 098 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/