lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  1 Nov 2023 09:23:23 +0800
From:   Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To:     jgg@...pe.ca
Cc:     kevin.tian@...el.com, joro@...tes.org, will@...nel.org,
        robin.murphy@....com, iommu@...ts.linux.dev,
        linux-kernel@...r.kernel.org,
        Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] iommufd/selftest: Remove unused function

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@...ux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7104
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.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

Powered by blists - more mailing lists