From patchwork Tue Jun 2 07:48:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1302229 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49bkjr2mrgz9sSd; Tue, 2 Jun 2020 17:50:40 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jg1gu-0006OQ-PR; Tue, 02 Jun 2020 07:50:32 +0000 Received: from mail-pf1-f196.google.com ([209.85.210.196]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jg1gg-0006BS-RA for kernel-team@lists.ubuntu.com; Tue, 02 Jun 2020 07:50:18 +0000 Received: by mail-pf1-f196.google.com with SMTP id b201so579155pfb.0 for ; Tue, 02 Jun 2020 00:50:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZLBR0u/dH6cwhNHx+tr/jXLLwHhzSPE6z8YX3hJuz6k=; b=eFtMInqI22JM0filzLdTYw57mvJGfvAEoL/vN+2dLHh16tRuw9Nh3Izwab2Gx3goUq iv4unJQ5ZjM/yQHLkvZ625ykcuG4AjfPb8GBroKt7hoBafYeS0Oz3S4081piE9KIGOBW PYARk/FazprXE+rMp9UII8UrJlZqoMgdrvLjY98ZuYp6oCEbWVnN02BBWwKdZmvTDNtg fguysCSw4pcl4im7wbWo9z4gEBZe6G4VMCA1I15pUsCMlWTGTZBFvbfsvN0J5Vgu53Cc jPJov4XoOffrQkY08QD7/NJTosPhP6RoiMGp3qe3+jF0fuw/9YlGVDESVjMP3pTLWCNJ UQLA== X-Gm-Message-State: AOAM532Kb4MLb28ImZdR49PtkU5ZyNb3Y8tH6/mzrlBkZgHYAuxVKFQ3 qyfDHrNH1Z0+Jcg4b8tnehprEWB6uIs= X-Google-Smtp-Source: ABdhPJykvuaYPgyt6hOuChzdue141I7xcJETqVZQrpnLCfJ1rF4Ol8zPe0ltZTQhFRGmR5ns6elVWw== X-Received: by 2002:a62:8487:: with SMTP id k129mr21915302pfd.296.1591084216137; Tue, 02 Jun 2020 00:50:16 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id v1sm1483693pjn.9.2020.06.02.00.50.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 00:50:15 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH v2 34/42][SRU][U] iommu: Unexport iommu_group_get_for_dev() Date: Tue, 2 Jun 2020 15:48:35 +0800 Message-Id: <20200602074843.1743493-35-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200602074843.1743493-1-vicamo.yang@canonical.com> References: <20200602074843.1743493-1-vicamo.yang@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Joerg Roedel BugLink: https://bugs.launchpad.net/bugs/1876707 The function is now only used in IOMMU core code and shouldn't be used outside of it anyway, so remove the export for it. Signed-off-by: Joerg Roedel Tested-by: Marek Szyprowski Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200429133712.31431-35-joro@8bytes.org Signed-off-by: Joerg Roedel (backported from commit 1b032ec1ecbce6047af7d11c9db432e237cb17d8 linux-next) Signed-off-by: You-Sheng Yang --- drivers/iommu/iommu.c | 4 ++-- include/linux/iommu.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 6bda2ed943c6..4ea8960c3ef9 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -91,6 +91,7 @@ static void __iommu_detach_group(struct iommu_domain *domain, struct iommu_group *group); static int iommu_create_device_direct_mappings(struct iommu_group *group, struct device *dev); +static struct iommu_group *iommu_group_get_for_dev(struct device *dev); #define IOMMU_GROUP_ATTR(_name, _mode, _show, _store) \ struct iommu_group_attribute iommu_group_attr_##_name = \ @@ -1510,7 +1511,7 @@ static int iommu_alloc_default_domain(struct device *dev) * to the returned IOMMU group, which will already include the provided * device. The reference should be released with iommu_group_put(). */ -struct iommu_group *iommu_group_get_for_dev(struct device *dev) +static struct iommu_group *iommu_group_get_for_dev(struct device *dev) { const struct iommu_ops *ops = dev->bus->iommu_ops; struct iommu_group *group; @@ -1541,7 +1542,6 @@ struct iommu_group *iommu_group_get_for_dev(struct device *dev) return ERR_PTR(ret); } -EXPORT_SYMBOL_GPL(iommu_group_get_for_dev); struct iommu_domain *iommu_group_default_domain(struct iommu_group *group) { diff --git a/include/linux/iommu.h b/include/linux/iommu.h index dd076366383f..7cfd2dddb49d 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -527,7 +527,6 @@ extern int iommu_page_response(struct device *dev, struct iommu_page_response *msg); extern int iommu_group_id(struct iommu_group *group); -extern struct iommu_group *iommu_group_get_for_dev(struct device *dev); extern struct iommu_domain *iommu_group_default_domain(struct iommu_group *); extern int iommu_domain_get_attr(struct iommu_domain *domain, enum iommu_attr,