From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757660AbdJKN7a (ORCPT ); Wed, 11 Oct 2017 09:59:30 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:58827 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752995AbdJKN72 (ORCPT ); Wed, 11 Oct 2017 09:59:28 -0400 From: Arnd Bergmann To: Joerg Roedel Cc: Arnd Bergmann , Magnus Damm , Robin Murphy , Geert Uytterhoeven , Laurent Pinchart , 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 Message-Id: <20171011135919.3653302-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:LoKKgEK7n1eJCcHEEDLp5sa7TxPcD5gYFa3k5VlnRvh5KSPhjIF diLBOBa0Dhga7praMXgBOTS6h1OjucMHXlwuDgTJETdzPpP3uRDFHvN0LF1I3SV1sywcGjP Tgl8v4boCnk5h7pE90uagVyk7Nuh9MnL/7mukV+W4kL/Un2vPQKNZiVMceAfz8itZnk+prW g+ZLgXsnZqK0zuyUpCftA== X-UI-Out-Filterresults: notjunk:1;V01:K0:B5B3DLJar1g=:n5qR3hV29jGEo5uTqnSbYE POdDiMe/rmeSFXgrUD9V8o4rsoUUFPfotUTMM7y59NQ5e5bKoHCuHO5SxBnS+MlaOvWhBYANU jgCyHw5X2hgrrE0f6dQfqEN6e7TFd0GbKOf/5AxvHpeDwHZIzp/i6Xcx9fm78k6pN8PzqXq+j mu2f2WgvRxO5wFHiObyxBfP+Ul3cyRcoqdIDCWvc0yh52QZMm+O3QjHw7/hsx/Iv1roRZAvaZ D1d0xNUDaw2cpor09156xRtc3uK3NmOuRqVgM6CSHBVECsGHX86yoR2VHIh2OH6LUGOxrSe04 aiuvUGUPHRExnoOKiEro8Wr+zkBU54qKXUkc4NXDQalvHTLoDSNtdacer9kjfz24IfsNJM33F 97uUk5hfeFzgq9cg8QrJ+4rtUu4TRSP1+UOFO9UoVRZb4rB57LPFnMemWI3R/kIsO498Y4nq2 NUYSzpbEJHAkLRumFUDw94NX43hILKGi9i/Q7pGGNfkjxjo+LDzuDv8qVRnEDwUVCTKlllj3w YtZvU5N8pbf6FfSn9g6lUoT/vzest8F3SJaB4rQRwrUfHtulx/kb+NA5iLsNJKLtkXhWiUGwf lIlIoX7L7ZSI/d7s0tBJs4qT/ecb7u9GEaLR/r77p+KcA+CFxDXmAYt1RAsHDf1PZXbN4zAEe 0J5CPRcIHQWaqczxdRK/1EG8Pg88N9/BcV06TdBu7tH0pV/e5T7htQaxga/rPmnA/pW4IOEjn 2gA/+D6ChCL3SEOtG7M9v3OeVbMaECmhK1SVpA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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