Skip to contentSkip to conversation

Janitortask

KJ Henne 2 participants 3 messages Apr 20, 2006 Kernel janitors

lore
Share & tools
lore

Henne

author
#0 lore raw

Hi there,

if somebody is interested in a janitortask, here is one:

Like in <kerneldoc>/pci.txt mentioned, the "struct pci_device_id" in drivers should be __devinitdata , to save place.
Each entry of that type takes 28 or 32 bits (depending on the architecture), and many drivers are for chips with a handfull of these entrys.

A point to start is:
cd <kernelsource>/drivers
fgrep -r "static struct pci_device_id" |grep -v "__devinitdata"

Sure it's better to look for the others like __init/_exit/__devinit/__devexit,... too, that make that automagicially. The ALSA-drivers have been done by me.

Best regards,
Henne

P.S.: Kerneljanitors is a great thing.
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 6 lines · Henne

Hi there,

if somebody is interested in a janitortask, here is one:

Like in <kerneldoc>/pci.txt mentioned, the "struct pci_device_id" in drivers should be __devinitdata , to save place.

Well, for almost all systems, this will not really save any memory. You have to disable CONFIG_HOTPLUG for this to be true, and that option is hard to turn off now.

And you have to build the driver into the kernel.

In all, it's a very minor thing. But hey, I will not refuse patches...

thanks,

greg k-h

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

author
#2 lore raw
In reply to Henne

Okay,

but for the correctness it should be done. And I'll see something other that ALSA drivers ;).
Is there a prefered way for adding __init/__exit ?
In "writing an ALSA driver" it's static struct foo __init structname[] and I've seen static struct foo structname[] __init
in the sources too. I know that this makes no difference to the compiler, but for the readability.

Greets
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors