From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 876ECC43334 for ; Fri, 8 Jul 2022 08:48:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject:Cc: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IiX69tmZgWTt1esxReNhUbT0TxEK5t28j3QVcOduJMs=; b=HpI6ZM5B8xZagj 2xKzUXoMPfLijH1YPQROxUEgK1QrL793EUP9JGyfW4ul/eJOeZwcNWEmXzNoek0aSVghX3mKSvlj/ 1s2DIppvIeWgxKmJoF+aZ6mtlz91gHlj8xyrfjYMw9SOrdPoUnxe35qbAMe2S+zgU7FOh2bo/2dG+ Yvga+amzG+uDp+Gh2vjiviQizF35H7UzMHf/+mDbfzg/AhL+tYL56IKFVGHLPZxfekmSay9/JcPas h1biHRVxeY/nJZ897M7WPBa7XaRLKwu7cL4dd6t746mghNCgW4m2Z0AgIjB8EO73E2mredocS3DMS pUgqKaAuRCfoES8y4w8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9jeV-002f0F-UI; Fri, 08 Jul 2022 08:47:56 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9jeS-002eyT-EX for linux-arm-kernel@lists.infradead.org; Fri, 08 Jul 2022 08:47:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657270072; x=1688806072; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=lPN3tr4eh0tfXsjtQ0DQnavtXzaN0esQyO+xtoyOkig=; b=S6tNK2oYQol+9rU831xRYek/XSJqLCF+votJoJsodZZRkRIdFcX4V1+w xKIa6t9WguQYC+TLlUZ1a/lb1YURO/ZYMum7vkWr6mbustvwhaVJmYsNh aIbICF3rfGihWnhu94H5kYPhBSXoSEeonxpbxCJ7xANyFWv04Pu1lL8Np touxunA7BDzbHcx03p0hSl97z4t8rGKm+iN+kmJoX5X41u7KEm4aMW9K/ AwC5U+zT8kjachbOSl4jAHSQnqVMWrNu7pZeR56y/dTkMmGwZoAnl6zWo B9uVMReWYpYs6Lkxqq0/CiH6lZ/KaeadycuKXauKHOfSprA2MQRIUzVdm A==; X-IronPort-AV: E=McAfee;i="6400,9594,10401"; a="282985379" X-IronPort-AV: E=Sophos;i="5.92,255,1650956400"; d="scan'208";a="282985379" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2022 01:47:51 -0700 X-IronPort-AV: E=Sophos;i="5.92,255,1650956400"; d="scan'208";a="621140950" Received: from yanc1-mobl.ccr.corp.intel.com (HELO [10.255.28.91]) ([10.255.28.91]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2022 01:47:49 -0700 Message-ID: <452e850f-c351-8718-d888-ce680d6c0237@linux.intel.com> Date: Fri, 8 Jul 2022 16:47:47 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: baolu.lu@linux.intel.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/4] iommu: remove iommu_dev_feature_enabled Content-Language: en-US To: Christoph Hellwig , Joerg Roedel , Sven Peter , David Woodhouse , Will Deacon , Robin Murphy , Yong Wu , Jean-Philippe Brucker References: <20220708080616.238833-1-hch@lst.de> <20220708080616.238833-3-hch@lst.de> From: Baolu Lu In-Reply-To: <20220708080616.238833-3-hch@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220708_014752_601846_5BB8BEE3 X-CRM114-Status: GOOD ( 20.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022/7/8 16:06, Christoph Hellwig wrote: > Remove the unused iommu_dev_feature_enabled function. > > Signed-off-by: Christoph Hellwig A nit comment below, anyway Reviewed-by: Lu Baolu > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 - > drivers/iommu/iommu.c | 13 ------------- > include/linux/iommu.h | 9 --------- > 3 files changed, 23 deletions(-) > > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > index 1b6c17dd81ee4..4d30a8d2bc236 100644 > --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > @@ -2853,7 +2853,6 @@ static struct iommu_ops arm_smmu_ops = { > .of_xlate = arm_smmu_of_xlate, > .get_resv_regions = arm_smmu_get_resv_regions, > .put_resv_regions = generic_iommu_put_resv_regions, > - .dev_feat_enabled = arm_smmu_dev_feature_enabled, > .dev_enable_feat = arm_smmu_dev_enable_feature, > .dev_disable_feat = arm_smmu_dev_disable_feature, > .sva_bind = arm_smmu_sva_bind, > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > index 0aa141646bdf4..1bb016a6a2aa1 100644 > --- a/drivers/iommu/iommu.c > +++ b/drivers/iommu/iommu.c > @@ -2760,19 +2760,6 @@ int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features feat) > } > EXPORT_SYMBOL_GPL(iommu_dev_disable_feature); > > -bool iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features feat) > -{ > - if (dev->iommu && dev->iommu->iommu_dev) { > - const struct iommu_ops *ops = dev->iommu->iommu_dev->ops; > - > - if (ops->dev_feat_enabled) > - return ops->dev_feat_enabled(dev, feat); > - } > - > - return false; > -} > -EXPORT_SYMBOL_GPL(iommu_dev_feature_enabled); > - > /** > * iommu_sva_bind_device() - Bind a process address space to a device > * @dev: the device > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index a3acdb46b9391..0bc2eb14b0262 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -215,7 +215,6 @@ struct iommu_iotlb_gather { > * driver init to device driver init (default no) > * @dev_has/enable/disable_feat: per device entries to check/enable/disable ^^^ dev_has_feat() has been removed by the previous patch. > * iommu specific features. > - * @dev_feat_enabled: check enabled feature > * @sva_bind: Bind process address space to device > * @sva_unbind: Unbind process address space from device > * @sva_get_pasid: Get PASID associated to a SVA handle > @@ -247,7 +246,6 @@ struct iommu_ops { > bool (*is_attach_deferred)(struct device *dev); > > /* Per device IOMMU features */ > - bool (*dev_feat_enabled)(struct device *dev, enum iommu_dev_features f); > int (*dev_enable_feat)(struct device *dev, enum iommu_dev_features f); > int (*dev_disable_feat)(struct device *dev, enum iommu_dev_features f); > > @@ -670,7 +668,6 @@ void iommu_release_device(struct device *dev); > > int iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features f); > int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features f); > -bool iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features f); > > struct iommu_sva *iommu_sva_bind_device(struct device *dev, > struct mm_struct *mm, > @@ -997,12 +994,6 @@ const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode) > return NULL; > } > > -static inline bool > -iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features feat) > -{ > - return false; > -} > - > static inline int > iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features feat) > { Best regards, baolu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel