Re: [PATCH] utilities: add helper functions for safe 64-bit integer operations as 32-bit halves

Alan Cox
2007-04-21T20:59:54Z

> > +#define lower_32_bits(n) (sizeof(n) == 8 ? (u32)(n) : (n))
>
> n&0xffffffff would be simpler.
>
> Do we actually have any call for this?

The only case for all of this we care about is sector_t, which is one
type, with specific properties (eg always being positive). The rest is
over-engineering. Call it sector_upper32() do it the simple way and stop
trying to solve a problem we don't have