aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQian Cai <cai@lca.pw>2020-01-06 10:27:27 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2020-03-20 23:11:49 -0400
commitb49deba20b2da7805c2a648e8afe448413fc343d (patch)
tree8de4fa266673e8eab0cbd5561f5e70a505164061
parent92c6c9b7f61049f71f997b06c031f9ab0524bce5 (diff)
downloadlinux-yocto-b49deba20b2da7805c2a648e8afe448413fc343d.tar.gz
linux-yocto-b49deba20b2da7805c2a648e8afe448413fc343d.tar.bz2
linux-yocto-b49deba20b2da7805c2a648e8afe448413fc343d.zip
iommu/dma: fix variable 'cookie' set but not used
commit 55817b340a31951d23d1692db45522560b1d20f9 upstream. The commit c18647900ec8 ("iommu/dma: Relax locking in iommu_dma_prepare_msi()") introduced a compliation warning, drivers/iommu/dma-iommu.c: In function 'iommu_dma_prepare_msi': drivers/iommu/dma-iommu.c:1206:27: warning: variable 'cookie' set but not used [-Wunused-but-set-variable] struct iommu_dma_cookie *cookie; ^~~~~~ Fixes: c18647900ec8 ("iommu/dma: Relax locking in iommu_dma_prepare_msi()") Signed-off-by: Qian Cai <cai@lca.pw> Acked-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/iommu/dma-iommu.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index f77f201b7a8b..1b47276c45a9 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -899,7 +899,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
{
struct device *dev = msi_desc_to_dev(desc);
struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
- struct iommu_dma_cookie *cookie;
struct iommu_dma_msi_page *msi_page;
static DEFINE_MUTEX(msi_prepare_lock); /* see below */
@@ -908,8 +907,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
return 0;
}
- cookie = domain->iova_cookie;
-
/*
* In fact the whole prepare operation should already be serialised by
* irq_domain_mutex further up the callchain, but that's pretty subtle