mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Joerg Roedel <joro@8bytes.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Magnus Damm <damm+renesas@opensource.se>,
	Robin Murphy <robin.murphy@arm.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [PATCH] iommu/io-pgtable-arm: hide unused ipmmu_iotlb_sync
Date: Wed, 11 Oct 2017 15:59:06 +0200	[thread overview]
Message-ID: <20171011135919.3653302-1-arnd@arndb.de> (raw)

There are two sets of iommu_ops in this driver, and only
one of them contains a reference to the ipmmu_iotlb_sync
function. This leads to a compiler warning when these
operations are not in use:

drivers/iommu/ipmmu-vmsa.c:622:13: error: 'ipmmu_iotlb_sync' defined but not used [-Werror=unused-function]

We either want to use the function in both operations, or
we should hide it. Without having additional information
which approach is correct, I'm picking the second one here,
which avoids the build error.

Fixes: 32b124492bdf ("iommu/io-pgtable-arm: Convert to IOMMU API TLB sync")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/iommu/ipmmu-vmsa.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index af8140054273..bdd0d0d20925 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -619,14 +619,6 @@ static size_t ipmmu_unmap(struct iommu_domain *io_domain, unsigned long iova,
 	return domain->iop->unmap(domain->iop, iova, size);
 }
 
-static void ipmmu_iotlb_sync(struct iommu_domain *io_domain)
-{
-	struct ipmmu_vmsa_domain *domain = to_vmsa_domain(io_domain);
-
-	if (domain->mmu)
-		ipmmu_tlb_flush_all(domain);
-}
-
 static phys_addr_t ipmmu_iova_to_phys(struct iommu_domain *io_domain,
 				      dma_addr_t iova)
 {
@@ -810,6 +802,14 @@ static void ipmmu_domain_free_dma(struct iommu_domain *io_domain)
 	}
 }
 
+static void ipmmu_iotlb_sync(struct iommu_domain *io_domain)
+{
+	struct ipmmu_vmsa_domain *domain = to_vmsa_domain(io_domain);
+
+	if (domain->mmu)
+		ipmmu_tlb_flush_all(domain);
+}
+
 static int ipmmu_add_device_dma(struct device *dev)
 {
 	struct iommu_group *group;
-- 
2.9.0

             reply	other threads:[~2017-10-11 13:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 13:59 Arnd Bergmann [this message]
2017-10-11 14:16 ` Robin Murphy
2017-10-11 14:39   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171011135919.3653302-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=damm+renesas@opensource.se \
    --cc=geert+renesas@glider.be \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®