Linux IOMMU Development
 help / color / mirror / Atom feed
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: jgg@ziepe.ca
Cc: kevin.tian@intel.com, joro@8bytes.org, will@kernel.org,
	robin.murphy@arm.com, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH] iommufd/selftest: Remove unused function
Date: Wed,  1 Nov 2023 09:23:23 +0800	[thread overview]
Message-ID: <20231101012323.33154-1-jiapeng.chong@linux.alibaba.com> (raw)

The function are defined in the selftest.c file, but not called
elsewhere, so delete the unused function.

drivers/iommu/iommufd/selftest.c:511:1: warning: unused function 'get_md_pagetable_nested'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7104
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/iommu/iommufd/selftest.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
index 256f93715a0d..758d328a44cd 100644
--- a/drivers/iommu/iommufd/selftest.c
+++ b/drivers/iommu/iommufd/selftest.c
@@ -515,25 +515,6 @@ get_md_pagetable(struct iommufd_ucmd *ucmd, u32 mockpt_id,
 	return hwpt;
 }
 
-static inline struct iommufd_hw_pagetable *
-get_md_pagetable_nested(struct iommufd_ucmd *ucmd, u32 mockpt_id,
-			struct mock_iommu_domain_nested **mock_nested)
-{
-	struct iommufd_hw_pagetable *hwpt;
-
-	hwpt = __get_md_pagetable(ucmd, mockpt_id, IOMMUFD_OBJ_HWPT_NESTED);
-	if (IS_ERR(hwpt))
-		return hwpt;
-	if (hwpt->domain->type != IOMMU_DOMAIN_NESTED ||
-	    hwpt->domain->ops != &domain_nested_ops) {
-		iommufd_put_object(&hwpt->obj);
-		return ERR_PTR(-EINVAL);
-	}
-	*mock_nested = container_of(hwpt->domain,
-				    struct mock_iommu_domain_nested, domain);
-	return hwpt;
-}
-
 struct mock_bus_type {
 	struct bus_type bus;
 	struct notifier_block nb;
-- 
2.20.1.7.g153144c


             reply	other threads:[~2023-11-01  1:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01  1:23 Jiapeng Chong [this message]
2023-11-01 11:41 ` [PATCH] iommufd/selftest: Remove unused function Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231101012323.33154-1-jiapeng.chong@linux.alibaba.com \
    --to=jiapeng.chong@linux.alibaba.com \
    --cc=abaci@linux.alibaba.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox