From nobody Wed Dec 17 09:46:53 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 460E5C4332F for ; Wed, 1 Nov 2023 01:23:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376972AbjKABXk (ORCPT ); Tue, 31 Oct 2023 21:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345060AbjKABXj (ORCPT ); Tue, 31 Oct 2023 21:23:39 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14600F4 for ; Tue, 31 Oct 2023 18:23:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VvIq7WL_1698801803; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VvIq7WL_1698801803) by smtp.aliyun-inc.com; Wed, 01 Nov 2023 09:23:29 +0800 From: Jiapeng Chong 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 , Abaci Robot Subject: [PATCH] iommufd/selftest: Remove unused function Date: Wed, 1 Nov 2023 09:23:23 +0800 Message-Id: <20231101012323.33154-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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_pa= getable_nested'. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=3D7104 Signed-off-by: Jiapeng Chong --- drivers/iommu/iommufd/selftest.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selft= est.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; } =20 -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 =3D __get_md_pagetable(ucmd, mockpt_id, IOMMUFD_OBJ_HWPT_NESTED); - if (IS_ERR(hwpt)) - return hwpt; - if (hwpt->domain->type !=3D IOMMU_DOMAIN_NESTED || - hwpt->domain->ops !=3D &domain_nested_ops) { - iommufd_put_object(&hwpt->obj); - return ERR_PTR(-EINVAL); - } - *mock_nested =3D container_of(hwpt->domain, - struct mock_iommu_domain_nested, domain); - return hwpt; -} - struct mock_bus_type { struct bus_type bus; struct notifier_block nb; --=20 2.20.1.7.g153144c