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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A593C433F5 for ; Mon, 7 Feb 2022 11:06:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235462AbiBGLEf (ORCPT ); Mon, 7 Feb 2022 06:04:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352978AbiBGK5S (ORCPT ); Mon, 7 Feb 2022 05:57:18 -0500 X-Greylist: delayed 1026 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 07 Feb 2022 02:57:17 PST Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77EE6C043181 for ; Mon, 7 Feb 2022 02:57:17 -0800 (PST) Received: from fraeml708-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4JsjGv00YNz67yfJ; Mon, 7 Feb 2022 18:36:06 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml708-chm.china.huawei.com (10.206.15.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 7 Feb 2022 11:40:08 +0100 Received: from [10.47.86.164] (10.47.86.164) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 7 Feb 2022 10:40:02 +0000 Message-ID: Date: Mon, 7 Feb 2022 10:39:58 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v1 04/10] iommu/vt-d: Remove iova_cache_get/put() To: Lu Baolu , Joerg Roedel , "Kevin Tian" , Ashok Raj , Liu Yi L , Jacob Pan CC: , , "Jason Gunthorpe" , Robin Murphy , "Christoph Hellwig" References: <20220207064142.1092846-1-baolu.lu@linux.intel.com> <20220207064142.1092846-5-baolu.lu@linux.intel.com> From: John Garry In-Reply-To: <20220207064142.1092846-5-baolu.lu@linux.intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.86.164] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/02/2022 06:41, Lu Baolu wrote: > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c > index 583ec0fa4ac1..e8d58654361c 100644 > --- a/drivers/iommu/intel/iommu.c > +++ b/drivers/iommu/intel/iommu.c > @@ -3348,9 +3348,6 @@ static inline int iommu_devinfo_cache_init(void) > static int __init iommu_init_mempool(void) > { > int ret; > - ret = iova_cache_get(); > - if (ret) > - return ret; > > ret = iommu_domain_cache_init(); > if (ret) > @@ -3362,7 +3359,6 @@ static int __init iommu_init_mempool(void) > > kmem_cache_destroy(iommu_domain_cache); > domain_error: nit: is this label still really required? only failures in iommu_domain_cache_init() jump to it, and that can return directly now. Thanks, John > - iova_cache_put();