From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 13/20] net/caif: Use kzalloc Date: Mon, 17 May 2010 22:55:37 -0700 (PDT) Message-ID: <20100517.225537.35834177.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org To: julia@diku.dk Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Julia Lawall Date: Thu, 13 May 2010 22:03:32 +0200 (CEST) > From: Julia Lawall > > Use kzalloc rather than the combination of kmalloc and memset. > > A simplified version of the semantic patch that makes this change is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > expression x,size,flags; > statement S; > @@ > > -x = kmalloc(size,flags); > +x = kzalloc(size,flags); > if (x == NULL) S > -memset(x, 0, size); > // > > Signed-off-by: Julia Lawall Applied.