On Fri, 20 Apr 2007 20:55:49 -0400 (EDT) "John Anthony Kazos Jr." <[email protected]> wrote: > +#define upper_32_bits(n) (sizeof(n) == 8 ? (u64)(n) >> 32 : 0) It's very unclear what type this returns, in terms of both size and signedness. Perhaps it always returns a u64, dunno. If it does, that will cause the arithmetic which uses this macro to go 64-bit too. Casting the whole return value to u32 would fix all those doubts up. > +#define lower_32_bits(n) (sizeof(n) == 8 ? (u32)(n) : (n)) n&0xffffffff would be simpler. Do we actually have any call for this? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- RE: [PATCH] cciss: Fix warnings during compilation under 32bit environment
- From: "Miller, Mike (OS Dev)" <[email protected]>
- RE: [PATCH] cciss: Fix warnings during compilation under 32bit environment
- From: James Bottomley <[email protected]>
- RE: [PATCH] cciss: Fix warnings during compilation under 32bit environment
- From: "Miller, Mike (OS Dev)" <[email protected]>
- RE: [PATCH] cciss: Fix warnings during compilation under 32bit environment
- From: James Bottomley <[email protected]>
- RE: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: "Cameron, Steve" <[email protected]>
- Re: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: Andrew Morton <[email protected]>
- Re: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: James Bottomley <[email protected]>
- Re: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: Andrew Morton <[email protected]>
- Re: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: James Bottomley <[email protected]>
- Re: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: Andrew Morton <[email protected]>
- Re: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: James Bottomley <[email protected]>
- Re: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: Andrew Morton <[email protected]>
- Re: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
- From: "John Anthony Kazos Jr." <[email protected]>
- [PATCH] utilities: add helper functions for safe 64-bit integer operations as 32-bit halves
- From: "John Anthony Kazos Jr." <[email protected]>
- RE: [PATCH] cciss: Fix warnings during compilation under 32bit environment
- Prev by Date: Re: [PATCH 08/10] mm: count writeback pages per BDI
- Next by Date: Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]
- Previous by thread: [PATCH] utilities: add helper functions for safe 64-bit integer operations as 32-bit halves
- Next by thread: Re: [PATCH] utilities: add helper functions for safe 64-bit integer operations as 32-bit halves
- Index(es):