All of
 help / color / mirror / Atom feed
* [KJ] still some possible kmalloc/kzalloc cleanups in the latest tree
@ 2007-02-10 16:36 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2007-02-10 16:36 UTC (permalink / raw)
  To: kernel-janitors

  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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-10 16:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-10 16:36 [KJ] still some possible kmalloc/kzalloc cleanups in the latest tree Robert P. J. Day

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.