lkml.org 
[lkml]   [2001]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Newbie idiotic questions.
Em Sat, Jun 16, 2001 at 09:35:34PM -0400, Richard B. Johnson escreveu:
> > [main.c, line 223]
> > if ((card->mpuout = kmalloc(sizeof(struct emu10k1_mpuout), GFP_KERNEL))
> >
> > Why is the struct type referenced for the allocation size? Why not,
> >
> > if ((card->mpuout = kmalloc(sizeof(card->mpuout), GFP_KERNEL))
> >
> > This seems to get the size for the actual object being allocated.
> >
>
> Again, you are correct. However, you may not know the history of the
> driver. Perhaps at one time the above statement was correct.

yes, and in fact this should be one of the entries in the kernel Janitor's
TODO list, please take a look at http://bazar.conectiva.com.br/~acme/TODO
and consider submitting some more things to cleanup so that people wanting
to start hacking the kernel can have some easy starting points. Also please
consider reading http://kernel-janitor.sourceforge.net

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:55    [W:0.063 / U:3.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site