From patchwork Wed Oct 11 13:59:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115556 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp792019qgn; Wed, 11 Oct 2017 06:59:33 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAek4lQuhPq6VsazwDiIixBMBU5arRavnJdV06dHDls2PQCHp1v1Dkfd0ETXkwSmBArNWES X-Received: by 10.101.74.206 with SMTP id c14mr15598719pgu.190.1507730373818; Wed, 11 Oct 2017 06:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507730373; cv=none; d=google.com; s=arc-20160816; b=X3o8/yxcSsgWk8kSUHNQ3kfH7XSRxrl8qvdv17UF6hUuhfgkdWDw9ZvrZkFKjU2AYb GFBA6WFNfUffX3or0Vu6sznYLFWaUemtiwkb6vmGvmAWhuLieibK/vIQAo4ApGuEKpdj ny3qONXsUTAp5TNOwyA5Bmq1yZqnNT/LFJwd3Gn4uGereAeTGbfXVEbvxTZEuYF5DkoM zOq5RBaX0TBJHsP6/1Hu8M4Jkz9hKS1WxkGqqikKuT+ZNHChamhJCivaC8XXYEwwyBAT NncEFZEWo8BZXM5OFVSIXZKntadmbnBhmtMBeKhG6aRZjj9Hwz6ls4EA9zOl3O9ao4OU /1nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=CVT4gKQ+lpSuo4UkQ0W0M/7MFtcdm16pvrShFuKKL1s=; b=fQtuWvNIo3rrffdcNUFHgvQ3ZgZdf5EbK0K4asxmIWiY1maIIN1CgFFwJ0am0mY5Fo aYUtZx2q9SzN8hLnB6E6iFTTtgTAi2wkdJsN8SLjEIZSoBDqf9n6SG4pccT7jEqBPdOe sIPgRm/1strFWGPUhGGZ4YCJlCs6w2X3/iWHn7frSwnZzQyjxbSZ37cKmDsxzcCG/I3a Yv7UStMJlhrN4bGyGeTxZ33Mc43mX2Ii80zJUyVg1eEDvkR3IHuJ+MLzX3QlXOwZr3Wy OV6NlQQebVAHcLQGDSxjHjmOEFV+smlNWbKPwnzx+zeADSoYttdIArnjiNZ9ZSOK0cGD Ugcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7si11013888pfd.80.2017.10.11.06.59.33; Wed, 11 Oct 2017 06:59:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757661AbdJKN7a (ORCPT + 27 others); 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 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MPXk1-1dyAno1o1J-004gFM; Wed, 11 Oct 2017 15:59:21 +0200 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 Precedence: bulk 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(-) -- 2.9.0 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;