mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sound : Replace kmalloc()+memset(0) with kzalloc().
Date: Thu, 7 Dec 2006 19:02:34 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0612071902010.22886@localhost.localdomain> (raw)
In-Reply-To: <200612080055.14488.m.kozlowski@tuxland.pl>

On Fri, 8 Dec 2006, Mariusz Kozlowski wrote:

> Hello,
>
>
> >   Replace all appropriate kmalloc() + memset() combinations with
> > kzalloc() throughout the sound/ directory.
>
> [... cut ...]
>
> > diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
> > index c3c8a72..f5e31f1 100644
> > --- a/sound/oss/i810_audio.c
> > +++ b/sound/oss/i810_audio.c
> > @@ -2580,10 +2580,9 @@ static int i810_open(struct inode *inode
> >  		for (i = 0; i < NR_HW_CH && card && !card->initializing; i++) {
> >  			if (card->states[i] == NULL) {
> >  				state = card->states[i] = (struct i810_state *)
> > -					kmalloc(sizeof(struct i810_state), GFP_KERNEL);
> > +					kzalloc(sizeof(struct i810_state), GFP_KERNEL);
>
> You can remove those casts while you're at it.

i actually thought about that, but decided to restrict that submission
to just the kmalloc/memset replacement.  a subsequent patch could do a
global change of all k*alloc calls to get rid of superfluous casts.

rday

      reply	other threads:[~2006-12-08  0:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07 20:57 Robert P. J. Day
2006-12-07 23:55 ` Mariusz Kozlowski
2006-12-08  0:02   ` Robert P. J. Day [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0612071902010.22886@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.kozlowski@tuxland.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®