Skip to content

Commit

Permalink
stop using DMA_xxBIT_MASK
Browse files Browse the repository at this point in the history
Now that we have DMA_BIT_MASK(), these macros are pointless.

Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 18, 2007
1 parent 34c6538 commit 8f286c3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/linux/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ enum dma_data_direction {
DMA_NONE = 3,
};

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

#define DMA_64BIT_MASK (~0ULL)
/*
* NOTE: do not use the below macros in new code and do not add new definitions
* here.
*
* Instead, just open-code DMA_BIT_MASK(n) within your driver
*/
#define DMA_64BIT_MASK DMA_BIT_MASK(64)
#define DMA_48BIT_MASK DMA_BIT_MASK(48)
#define DMA_47BIT_MASK DMA_BIT_MASK(47)
#define DMA_40BIT_MASK DMA_BIT_MASK(40)
Expand Down

0 comments on commit 8f286c3

Please sign in to comment.