summaryrefslogtreecommitdiff
path: root/kernel/dma/debug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-08-04 17:29:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-04 17:29:57 -0700
commit2ed90dbbf7be3b7cd2790fc6fa946c478ab496b8 (patch)
tree05bdc7c3d5164836b3a64016c79c90b6f21d2962 /kernel/dma/debug.c
parent9fa867d2acbca6c4cd317ab75c0e94e1703af2b0 (diff)
parent274b3f7bf34415eed106e479e4815e897ce5d763 (diff)
Merge tag 'dma-mapping-5.9' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping updates from Christoph Hellwig: - make support for dma_ops optional - move more code out of line - add generic support for a dma_ops bypass mode - misc cleanups * tag 'dma-mapping-5.9' of git://git.infradead.org/users/hch/dma-mapping: dma-contiguous: cleanup dma_alloc_contiguous dma-debug: use named initializers for dir2name powerpc: use the generic dma_ops_bypass mode dma-mapping: add a dma_ops_bypass flag to struct device dma-mapping: make support for dma ops optional dma-mapping: inline the fast path dma-direct calls dma-mapping: move the remaining DMA API calls out of line
Diffstat (limited to 'kernel/dma/debug.c')
-rw-r--r--kernel/dma/debug.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index d628ab09d97b..5aba04075530 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -144,8 +144,12 @@ static const char *type2name[] = {
[dma_debug_resource] = "resource",
};
-static const char *dir2name[4] = { "DMA_BIDIRECTIONAL", "DMA_TO_DEVICE",
- "DMA_FROM_DEVICE", "DMA_NONE" };
+static const char *dir2name[] = {
+ [DMA_BIDIRECTIONAL] = "DMA_BIDIRECTIONAL",
+ [DMA_TO_DEVICE] = "DMA_TO_DEVICE",
+ [DMA_FROM_DEVICE] = "DMA_FROM_DEVICE",
+ [DMA_NONE] = "DMA_NONE",
+};
/*
* The access to some variables in this macro is racy. We can't use atomic_t