All of
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <>
Subject: [KJ] still some possible kmalloc/kzalloc cleanups in the latest tree
Date: Sat, 10 Feb 2007 16:36:57 +0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0702101130520.4899@CPE00045a9c397f-CM001225dbafb6> (raw)

  if someone is bored and wants something to do, it looks like there's
still some cleanup to be done in the latest git tree regarding
replacing kmalloc/memset calls with a single call to kzalloc:

  i just added a couple lines to that wiki page describing this,
including running the command:

  $ grep -Er -B10 "memset ?\(.*,0 ?," * | less

to find calls of the form "memset(...,0,...)" and getting the previous
10 lines to see if there's a kmalloc call shortly before then.  as
just one example of what pops up:

drivers/net/pcmcia/ibmtr_cs.c-    /* Create new token-ring device */
drivers/net/pcmcia/ibmtr_cs.c-    info = kmalloc(sizeof(*info), GFP_KERNEL);
drivers/net/pcmcia/ibmtr_cs.c-    if (!info) return -ENOMEM;
drivers/net/pcmcia/ibmtr_cs.c:    memset(info,0,sizeof(*info));

  personally, i thought i'd sent in patches to clean most of that, so
maybe they're still working their way thru the system but someone else
is welcome to take care of that.


Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
Kernel-janitors mailing list

                 reply	other threads:[~2007-02-10 16:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* 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.0702101130520.4899@CPE00045a9c397f-CM001225dbafb6 \ \ \

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.