public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Newbie idiotic questions.
@ 2001-06-17  1:19 Bill Pringlemeir
  2001-06-17  1:32 ` Jeff Garzik
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Bill Pringlemeir @ 2001-06-17  1:19 UTC (permalink / raw)
  To: linux-kernel


I have been looking at the emu10k1 driver and I had a few questions
about general idioms used there.

In a line like this,

[main.c, line 175]

	for (count = 0; count < sizeof(card->digmix) / sizeof(card->digmix[0]); count++) {

Isn't there some sort of `ALEN' macro available, or is this
considered to muddy things by using a macro?

[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.

[cardmi.c, line 42]

static struct {
	int (*Fn) (struct emu10k1_mpuin *, u8);
} midistatefn[] = {
...

Why aren't all the gobs of constant data in this driver declared as
constant?  Do it give a performance advantage by having the data in a
different MMU section and better cache effects or something?

Thanks for any helpful pointers.  I did read the FAQ.  I am just
wonder if I would get screamed at for changing things like this and
why... so I will probably get yelled at for suggesting them anyway,
but at least I won't have went through the effort.  Now that I have
pointed that out, the will probably irk people even more...

regards,
Bill Pringlemeir.



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2001-06-18  9:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-17  1:19 Newbie idiotic questions Bill Pringlemeir
2001-06-17  1:32 ` Jeff Garzik
2001-06-17 10:48   ` Daniel Phillips
2001-06-17 12:27     ` rjd
2001-06-17 15:01       ` Daniel Phillips
2001-06-17 15:08         ` Jeff Garzik
2001-06-17 15:38           ` David Flynn
2001-06-17 15:54             ` Jeff Garzik
2001-06-17 19:18               ` Geert Uytterhoeven
2001-06-17 20:08                 ` Daniel Phillips
2001-06-17 20:37                   ` Alexander Viro
2001-06-17 21:28                     ` Daniel Phillips
2001-06-17 22:33                       ` Alexander Viro
2001-06-18  9:14                         ` Roman Zippel
2001-06-18  9:30                           ` Alexander Viro
2001-06-17 21:17               ` Bill Pringlemeir
2001-06-17  1:35 ` Richard B. Johnson
2001-06-17  3:01   ` Arnaldo Carvalho de Melo
2001-06-17  8:06 ` rjd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox