summaryrefslogtreecommitdiff
path: root/drivers/dma/ioat/dma.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-12-14 06:36:23 +0300
committerVinod Koul <vinod.koul@intel.com>2016-12-14 06:36:23 +0300
commit3f809e844c6ba46fe5e16b20ad70ac4027341b36 (patch)
tree2bd7f7ceb11d3ecd03c43aa3bc2bd4db8bb99478 /drivers/dma/ioat/dma.c
parent7fc3b3f946341a035f05e13756f7b2c441492c55 (diff)
parent7393fca924e22ad3c071d8bbcc5acda21d0c2710 (diff)
downloadlinux-3f809e844c6ba46fe5e16b20ad70ac4027341b36.tar.xz
Merge branch 'topic/ioat' into for-linus
Diffstat (limited to 'drivers/dma/ioat/dma.c')
-rw-r--r--drivers/dma/ioat/dma.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index c867db765936..a371b07a0981 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -39,6 +39,7 @@
#include "../dmaengine.h"
static char *chanerr_str[] = {
+ "DMA Transfer Source Address Error",
"DMA Transfer Destination Address Error",
"Next Descriptor Address Error",
"Descriptor Error",
@@ -66,7 +67,6 @@ static char *chanerr_str[] = {
"Result Guard Tag verification Error",
"Result Application Tag verification Error",
"Result Reference Tag verification Error",
- NULL
};
static void ioat_eh(struct ioatdma_chan *ioat_chan);
@@ -75,13 +75,10 @@ static void ioat_print_chanerrs(struct ioatdma_chan *ioat_chan, u32 chanerr)
{
int i;
- for (i = 0; i < 32; i++) {
+ for (i = 0; i < ARRAY_SIZE(chanerr_str); i++) {
if ((chanerr >> i) & 1) {
- if (chanerr_str[i]) {
- dev_err(to_dev(ioat_chan), "Err(%d): %s\n",
- i, chanerr_str[i]);
- } else
- break;
+ dev_err(to_dev(ioat_chan), "Err(%d): %s\n",
+ i, chanerr_str[i]);
}
}
}