From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbZLSIk7 (ORCPT ); Sat, 19 Dec 2009 03:40:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752500AbZLSIk6 (ORCPT ); Sat, 19 Dec 2009 03:40:58 -0500 Received: from cantor.suse.de ([195.135.220.2]:59944 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997AbZLSIk5 (ORCPT ); Sat, 19 Dec 2009 03:40:57 -0500 Date: Sat, 19 Dec 2009 09:40:55 +0100 Message-ID: From: Takashi Iwai To: Julia Lawall Cc: Jaroslav Kysela , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 7/7] sound: Use kzalloc for allocating only one thing In-Reply-To: References: User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Sat, 19 Dec 2009 08:18:03 +0100 (CET), Julia Lawall wrote: > > From: Julia Lawall > > Use kzalloc rather than kcalloc(1,...) > > The semantic patch that makes this change is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ > @@ > > - kcalloc(1, > + kzalloc( > ...) > // > > Signed-off-by: Julia Lawall Applied now. Thanks. Takashi > > --- > sound/isa/msnd/msnd_midi.c | 2 +- > sound/pci/hda/patch_realtek.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff -u -p a/sound/isa/msnd/msnd_midi.c b/sound/isa/msnd/msnd_midi.c > --- a/sound/isa/msnd/msnd_midi.c 2009-03-28 23:34:55.000000000 +0100 > +++ b/sound/isa/msnd/msnd_midi.c 2009-12-19 07:52:27.000000000 +0100 > @@ -162,7 +162,7 @@ int snd_msndmidi_new(struct snd_card *ca > err = snd_rawmidi_new(card, "MSND-MIDI", device, 1, 1, &rmidi); > if (err < 0) > return err; > - mpu = kcalloc(1, sizeof(*mpu), GFP_KERNEL); > + mpu = kzalloc(sizeof(*mpu), GFP_KERNEL); > if (mpu == NULL) { > snd_device_free(card, rmidi); > return -ENOMEM; > diff -u -p a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > --- a/sound/pci/hda/patch_realtek.c 2009-12-17 08:30:15.000000000 +0100 > +++ b/sound/pci/hda/patch_realtek.c 2009-12-19 07:52:50.000000000 +0100 > @@ -12857,7 +12857,7 @@ static int patch_alc268(struct hda_codec > int board_config; > int i, has_beep, err; > > - spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); > + spec = kzalloc(sizeof(*spec), GFP_KERNEL); > if (spec == NULL) > return -ENOMEM; > >