Messages in this thread | | | Subject | Re: [PATCH 5/7] more CardServices() removals (drivers/net/wireless) | From | Arjan van de Ven <> | Date | Wed, 24 Dec 2003 10:29:44 +0100 |
| |
> Ummm... there are many changes to the pcmcia net drivers in my > net-drivers-2.5-exp queue. All can be classified as fixes, to a greater > or lesser degree, and I would put those at a higher priority than API > cleanups and such.
This set is not so much about API cleanup as about fixing a REAL bug: CardServices() has a very broken prototype that miscompiles on amd64 on possibly others (even x86 with the right gcc flags).
Basically the function is implemented like this:
int CardServices(int func, void *a1, void *a2, void *a3) { ... }
however the prototype that drivers see is using varargs like this:
extern int CardServices(int func, ...);
varargs functions on amd64 have a different calling convention than "normal" functions so this mismatches the actual implementation's calling convention and goes west quite spectacular. The same might be true for other architectures, and is true for x86 when you use -mregparm.
You could argue we should just fix CardServices() instead, but well once you do that you might as well kill it; even in 2.4 it's an optional API which abstracts the real API.
[unhandled content-type:application/pgp-signature]
| |