]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
iommu/dma: fix variable 'cookie' set but not used
authorQian Cai <cai@lca.pw>
Mon, 6 Jan 2020 15:27:27 +0000 (10:27 -0500)
committerJoerg Roedel <jroedel@suse.de>
Tue, 7 Jan 2020 16:08:58 +0000 (17:08 +0100)
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>
drivers/iommu/dma-iommu.c

index c363294b3bb93ff9ce1165c06cab466dcfa4e68a..a2e96a5fd9a7b3a6d9e2bf35ea1a8d7bdc78f1f2 100644 (file)
@@ -1203,7 +1203,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 */
 
@@ -1212,8 +1211,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