Skip to content

Commit 55817b3

Browse files
Qian Caijoergroedel
authored andcommitted
iommu/dma: fix variable 'cookie' set but not used
The commit c186479 ("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: c186479 ("iommu/dma: Relax locking in iommu_dma_prepare_msi()") Signed-off-by: Qian Cai <[email protected]> Acked-by: Robin Murphy <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent f78947c commit 55817b3

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/iommu/dma-iommu.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
12031203
{
12041204
struct device *dev = msi_desc_to_dev(desc);
12051205
struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
1206-
struct iommu_dma_cookie *cookie;
12071206
struct iommu_dma_msi_page *msi_page;
12081207
static DEFINE_MUTEX(msi_prepare_lock); /* see below */
12091208

@@ -1212,8 +1211,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
12121211
return 0;
12131212
}
12141213

1215-
cookie = domain->iova_cookie;
1216-
12171214
/*
12181215
* In fact the whole prepare operation should already be serialised by
12191216
* irq_domain_mutex further up the callchain, but that's pretty subtle

0 commit comments

Comments
 (0)