[PATCH 5/5] Revert "nvme: use the DMA_ATTR_NO_WARN attribute"

Tim Gardner tim.gardner at canonical.com
Fri Nov 18 17:42:17 UTC 2016


BugLink: http://bugs.launchpad.net/bugs/1637565

This reverts commit 7c50722ad76b1b90538912fb84e2c3e206fab327.

This commit was erroneously backported and causes a noisy warning. Reverting
is the right thing to do.

  CC [M]  drivers/nvme/host/scsi.o
In file included from include/asm-generic/pci-dma-compat.h:7:0,
                 from ./arch/x86/include/asm/pci.h:124,
                 from include/linux/pci.h:1502,
                 from drivers/nvme/host/pci.c:35:
drivers/nvme/host/pci.c: In function ‘nvme_map_data’:
include/linux/dma-mapping.h:63:26: warning: passing argument 5 of ‘dma_map_sg_attrs’ makes pointer from integer without a cast [-Wint-conversion]
 #define DMA_ATTR_NO_WARN (1UL << 8)
                          ^
drivers/nvme/host/pci.c:634:5: note: in expansion of macro ‘DMA_ATTR_NO_WARN’
     DMA_ATTR_NO_WARN))
     ^
In file included from ./arch/x86/include/asm/dma-mapping.h:49:0,
                 from include/linux/dma-mapping.h:140,
                 from include/asm-generic/pci-dma-compat.h:7,
                 from ./arch/x86/include/asm/pci.h:124,
                 from include/linux/pci.h:1502,
                 from drivers/nvme/host/pci.c:35:
include/asm-generic/dma-mapping-common.h:47:19: note: expected ‘struct dma_attrs *’ but argument is of type ‘long unsigned int’
 static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,

Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
 drivers/nvme/host/pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 5256448..6ea7430 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -630,8 +630,7 @@ static int nvme_map_data(struct nvme_dev *dev, struct request *req,
 		goto out;
 
 	ret = BLK_MQ_RQ_QUEUE_BUSY;
-	if (!dma_map_sg_attrs(dev->dev, iod->sg, iod->nents, dma_dir,
-				DMA_ATTR_NO_WARN))
+	if (!dma_map_sg(dev->dev, iod->sg, iod->nents, dma_dir))
 		goto out;
 
 	if (!nvme_setup_prps(dev, req, blk_rq_bytes(req)))
-- 
2.7.4





More information about the kernel-team mailing list