From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752420AbbCXUq4 (ORCPT ); Tue, 24 Mar 2015 16:46:56 -0400 Received: from down.free-electrons.com ([37.187.137.238]:52352 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752190AbbCXUqx (ORCPT ); Tue, 24 Mar 2015 16:46:53 -0400 Message-ID: <5511CD10.6040709@free-electrons.com> Date: Tue, 24 Mar 2015 13:46:08 -0700 From: Michael Opdenacker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Hannes Reinecke , JBottomley@parallels.com CC: joe@perches.com, Elliott@hp.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [RESEND] aic7xxx: replace kmalloc/memset by kzalloc References: <94D0CD8314A33A4D9D801C0FE68B40295930E577@G4W3296.americas.hpqcorp.net> <1427041891-2694-1-git-send-email-michael.opdenacker@free-electrons.com> <550FB9BE.5010801@suse.de> In-Reply-To: <550FB9BE.5010801@suse.de> 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, On 03/22/2015 11:59 PM, Hannes Reinecke wrote: > On 03/22/2015 05:31 PM, Michael Opdenacker wrote: >> This replaces kmalloc + memset by a call to kzalloc >> (or kcalloc when appropriate, which zeroes memory too) >> >> This also fixes one checkpatch.pl issue in the process. >> >> This improvement was suggested by "make coccicheck" >> >> Signed-off-by: Michael Opdenacker > Reviewed-by: Hannes Reinecke I'm sending a version that reverts the use of kcalloc() instead of kzalloc(). For reasons I don't understand, I didn't see the end of Robert Elliott's comment that the use of kcalloc() could prevent the compiler from detecting an overflow. Michael. -- Michael Opdenacker, CEO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com +33 484 258 098