when CONFIG_PCI is not defined
Martin Mares
mj en suse.cz
Lun Ene 24 22:24:58 CST 2000
Hello,
> 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.
Except for few rather esoteric things like searching for capabilities
or manual control of power management states, the whole old API works
in the !CONFIG_PCI case.
> 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.
Well, if I look at usage of the API in the drivers, I immediately see
that almost all drivers using any PCI API are PCI-only drivers which
are not even compiled in if CONFIG_PCI is turned off. Hence the pci_*
stubs or ifdefs apply only to the few existing drivers which support
the same device on different busses.
On the other hand, all functions would become dead, are marked as
either __devinit or __devexit, so that they will end up as init code
or even thrown away if the driver is compiled without CONFIG_HOTPLUG
(which is very likely in the !CONFIG_PCI case). So the code size increase
is probably harmless.
Have a nice fortnight
--
Martin `MJ' Mares <mj en ucw.cz> <mj en suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
"New PC concept: "plug and pray""
-
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