Re: Typedefs / gcc / HIGHMEM

From: H. Peter Anvin (
Date: Sat Dec 08 2001 - 18:40:24 EST

Followup to: <>
By author: Stephan von Krawczynski <>
In newsgroup:
> if (tp->rx_buffers[entry].mapping !=
> le32_to_cpu(tp->rx_ring[entry].buffer1)) {
> The first is u64, the second u32. Either the u64 value is not
> required, or the statement is broken. Astonishing there is _no_
> compiler warning in this line.

Why should there be? The u32 value gets promoted to u64 before the
comparison is done.

> BTW, my personal opinion to "typedef unsigned int u32" is that it
> should rather be "typedef unsigned long u32", but this is religious.

I see you have a background in environments where you move between 16-
and 32-bit machines. Guess what, in Linux the major movement is
between 32- and 64-bit machines, and "unsigned int" is consistent,
whereas "unsigned long" isn't (long is 32 bits on 32-bit machines, 64
bits on 64-bit machines.)


<> at work, <> in private!
"Unix gives you enough rope to shoot yourself in the foot."	<>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:13 EST