when CONFIG_PCI is not defined
Jeff Garzik
jgarzik en mandrakesoft.com
Lun Ene 24 12:15:09 CST 2000
Martin,
Please do not copy private mail from me to a public list. Very bad
netiquette.
Martin Mares wrote:
> Jeff Garzik wrote:
> > Would you mind reviewing pci.h to make sure that all necessary functions
> > are exported when CONFIG_PCI is not defined?
> > I think that some of the recent PCI additions were not available for the
> > !CONFIG_PCI case. This is wrong IMHO because pci.h is specifically
> > designed to provide support to drivers even when CONFIG_PCI is
> > undefined. It leads to much cleaner driver code.
> I'm not sure at all that this is the right way to go.
[...]
> in which case nothing gets optimized away when compiling without CONFIG_PCI
> and you end up with the driver full of dead code. Therefore to be on the
> clean side of the glass, you need #ifdef CONFIG_PCI anyway, so there isn't
> much sense in providing pci_register_driver() stub for PCI-less cases.
Well, if that is your and Linus' feeling, then you should rip out all
the inlined compatibility code. As it stands now, there is a random
collection of functions which work correctly for the !CONFIG_PCI case,
and a random collection of functions which break if CONFIG_PCI is not
defined. Bug city.
I fully realize that inlined functions with the new API would create a
SMALL bit of dead code. If you look at driver usage of the old APIs,
this condition has existed for a long time. Dead code with !CONFIG_PCI
was always a possibility.
Linus seems to favor _removing_ #ifdef trees from the main source code.
Your proposal adds #ifdefs to code, making driver code less clean (if
0.00001% more efficient for the !CONFIG_PCI case).
Regards,
Jeff
+
--
Jeff Garzik | Andre the Giant has a posse.
Building 1024 |
MandrakeSoft, Inc. |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda