From patchwork Tue May 26 13:01:56 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: 1298066 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 49WZ2q0XHWz9sTn; Tue, 26 May 2020 23:05:55 +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 1jdZHB-0007tN-Mj; Tue, 26 May 2020 13:05:49 +0000 Received: from mail-pl1-f194.google.com ([209.85.214.194]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jdZFp-0006fL-CV for kernel-team@lists.ubuntu.com; Tue, 26 May 2020 13:04:25 +0000 Received: by mail-pl1-f194.google.com with SMTP id y11so378689plt.12 for ; Tue, 26 May 2020 06:04:25 -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=pxdeoadOw/i3LH8cWm9cSEhNIeGFLUOjdypdskUp//U=; b=V9WN05xOijSwqEJnRPqlK0+CGedygdsbSChTkrF71a3OxBdXQPJSYljRE8mw5M57X/ l3Xs0IwoiQ4eAHs60WNph25D+XtuoF6aaoZ0zjPQYxSAVHfJRAvycKaEUTvmpRFRMT4N vtl9ds63hlAsvquzohBhM4klOTCmpqelM7WrtqskDz27lP6m6+5HHBvFBEm4m60jCzpA 3cef1ymkfWDepx0XXdYZBzbWb35YeGdqAeo9yFFTQqlcmjqdAiA019T9104B1DFSHq3u nTHZAQatnJi4eF+POKnBg5mi+N18+s2t+TksX6Xi3lYa/MDEgnUwv+g3Ehzw3h3nQQ0R yUzQ== X-Gm-Message-State: AOAM531iY3GXDgCkfDcpzd6537t1jJCRRNEjKYxZsO8610ZzReHHe1eG oAI0UVusUg6F30Yd4FFy67cyltwwppc= X-Google-Smtp-Source: ABdhPJx0tjK9zCtAaixXODK2qAhCJOg0uRg2e5hCHDA0fVYR3AMgrilBoOM42L2YlhWmsKTUp5PrsA== X-Received: by 2002:a17:90a:fe97:: with SMTP id co23mr25243568pjb.96.1590498261912; Tue, 26 May 2020 06:04:21 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id s63sm14953393pjj.16.2020.05.26.06.04.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 06:04:21 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 52/60][SRU][OEM-5.6] UBUNTU: SAUCE: iommu: Unexport iommu_group_get_for_dev() Date: Tue, 26 May 2020 21:01:56 +0800 Message-Id: <20200526130204.238445-53-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200526130204.238445-1-vicamo.yang@canonical.com> References: <20200526130204.238445-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 iommu/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 7f6c0cc4b294..9888a3c82b15 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 = \ @@ -1501,7 +1502,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; @@ -1532,7 +1533,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,