use unsigned long for IO port address

Randy.Dunlap rddunlap at
Wed Jan 19 12:31:49 EST 2005

Dominik Brodowski wrote:
>>+/* This (ioaddr_t) is exposed to userspace & hence cannot be changed. */
>> typedef u_int   ioaddr_t;
>> #else
>> typedef u_short	ioaddr_t;
>> #endif
>>+typedef unsigned long kio_addr_t;
>> typedef u_short	socket_t;
>> typedef u_int	event_t;
> I'm not convinced (yet?) that we want a typedef for that... any reason we
> don't use "unsigned long" directly in all these places?

Well, one reason is so that the next time this is changed, there are
fewer lines of code to change, so it can be done easier/faster and
less prone to errors.  Some printk format args would still need to
be modified, though.

I don't care for typedefs that hide structs, but typedefs for
some basic types are OK...


More information about the linux-pcmcia mailing list