Re: [PATCH 1/1] unify DMA_..BIT_MASK definitions: v3.1

Robert P. J. Day
2007-10-05T21:07:37Z

On Fri, 5 Oct 2007, Andrew Morton wrote:

> -#define DMA_BIT_MASK(n) ((1ULL<<(n))-1)
> +#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))

or you could take advantage of the macros in kernel.h and write that
as:

+#define DMA_BIT_MASK(n) (((n) == 64) ? ULLONG_MAX : ((1ULL<<(n))-1))

rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================