Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1015836ybh; Mon, 13 Jul 2020 07:18:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc4XP4q2C8Ng7q4OV7/yFje/JY/MvUnhQpOsUakz1GM0bDQ0WOWW3iJniYBS30HURjPC6X X-Received: by 2002:a17:906:3850:: with SMTP id w16mr75699684ejc.205.1594649925089; Mon, 13 Jul 2020 07:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594649925; cv=none; d=google.com; s=arc-20160816; b=f4DiRNwp1EPgEgjhcGgI8f1kxcFTVyYxpCu36HmwmKDXx09zeeL2iSNSPvmpvRfCUC qShwMCcInnAlOMNTJBjNiCCQ2f+4Is9QX6QZjavKD1OkEJTVDqLyZZ1v/iKwjBVtSaa3 Q1ift3X6U7caCA3XflqevWUxPDt+s94lGIXc/OwWZvT7rpU+8oFqNZaomfosKubC1iML fFML9Bw4ORSCn3C5GHiS5ulqi6vbh9tr6y4Z2pakfWEQL4vkQN1vjMvi/0h8gj4mVdjd ZwwA6YwhiF7oOA3qDzvbmI8KGd6Nvuys8yMPMDzAxm2VIOAMw2pLFrVv6lBE1dGO5+v0 cOXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Ql069apK9wSJ+R01RGGdY0bqDG9eArBflOEXPw9uUuA=; b=Ad3F8ca2yMFIP8dgWML7Kg0W/H7qTlDZLogBvpPRueWGt2t1XJ2fFMkMZ2w80NRCa/ AgM0XmE9zGdX+dy4Ue6n73WPKAQxmxm7lqYPhLX77Sb3QJX8w/0MAgpybIP5Zu4gVxo8 q7bGMMDoY4XgD9QlrSPaVWYsVeAkpHgibuwT0Fz0nj2ShVjCN5fPSgrwe1LQ8tpBgvhk 3+OF9geXS18Kmh3WlTLVHprZcmUywBphEEs1xjbkUbSlOjl3F89dE19WasN1QVu6C4Pn D366CuSMn5/QlK7JtiBtAKnColNR/qW7nXEuJpeOTeGbQ/ag9U89jIq1U7dyzBSrTP2Z uyNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si8060163ejb.157.2020.07.13.07.18.19; Mon, 13 Jul 2020 07:18:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729867AbgGMOPv (ORCPT + 99 others); Mon, 13 Jul 2020 10:15:51 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7845 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729649AbgGMOPu (ORCPT ); Mon, 13 Jul 2020 10:15:50 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7CDD5BCC515B84495D4F; Mon, 13 Jul 2020 22:15:48 +0800 (CST) Received: from kernelci-master.huawei.com (10.175.101.6) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Mon, 13 Jul 2020 22:15:38 +0800 From: Wei Yongjun To: Hulk Robot , Joerg Roedel , Eric Auger , Tom Murphy CC: Wei Yongjun , , Subject: [PATCH -next] iommu: Make some functions static Date: Mon, 13 Jul 2020 22:25:42 +0800 Message-ID: <20200713142542.50294-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sparse tool complains as follows: drivers/iommu/iommu.c:386:5: warning: symbol 'iommu_insert_resv_region' was not declared. Should it be static? drivers/iommu/iommu.c:2182:5: warning: symbol '__iommu_map' was not declared. Should it be static? Those functions are not used outside of iommu.c, so mark them static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/iommu/iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 1ed1e14a1f0c..40947f5bc6c5 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -383,8 +383,8 @@ static ssize_t iommu_group_show_name(struct iommu_group *group, char *buf) * Elements are sorted by start address and overlapping segments * of the same type are merged. */ -int iommu_insert_resv_region(struct iommu_resv_region *new, - struct list_head *regions) +static int iommu_insert_resv_region(struct iommu_resv_region *new, + struct list_head *regions) { struct iommu_resv_region *iter, *tmp, *nr, *top; LIST_HEAD(stack); @@ -2179,8 +2179,8 @@ static size_t iommu_pgsize(struct iommu_domain *domain, return pgsize; } -int __iommu_map(struct iommu_domain *domain, unsigned long iova, - phys_addr_t paddr, size_t size, int prot, gfp_t gfp) +static int __iommu_map(struct iommu_domain *domain, unsigned long iova, + phys_addr_t paddr, size_t size, int prot, gfp_t gfp) { const struct iommu_ops *ops = domain->ops; unsigned long orig_iova = iova;