summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-10-18 12:05:07 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 23:37:21 +0200
commit8f286c33f1e838d631f4a3260b33efce4bc5973c (patch)
treeadf48bc9faabd41ddff8609f9c7de86373ccce11
parentunify DMA_..BIT_MASK definitions: v3.1 (diff)
downloadlinux-8f286c33f1e838d631f4a3260b33efce4bc5973c.tar.xz
linux-8f286c33f1e838d631f4a3260b33efce4bc5973c.zip
stop using DMA_xxBIT_MASK
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>
-rw-r--r--include/linux/dma-mapping.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 29b028597dcd..101a2d4636be 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -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)