Message ID | 20230104125725.271850-7-baolu.lu@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5133083wrt; Wed, 4 Jan 2023 05:07:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXsXuTfHTS0n9MD6was8+TpZoapFVPuqF545So2IEoIi3TqGvdJtJLr0PrBURawRjlcJKHiv X-Received: by 2002:a17:90a:1957:b0:225:a78a:942f with SMTP id 23-20020a17090a195700b00225a78a942fmr51530571pjh.5.1672837652173; Wed, 04 Jan 2023 05:07:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672837652; cv=none; d=google.com; s=arc-20160816; b=aE+Xb3P+aFJYgP1ylvg0edy3E/AXBufFCEqWYdsCuTYKJzIv8rSeqONKEbE+zcNBMy mrFrZY90hXMuc3Nnh7oEE0+idpKRNqVVjh1uUIsyFONyLcP0V1r4/nZ63xfAWGVVaxvw 098FO9EX4XGsO01zKM1vV/Q8GmfJXhoei2kK3jMEuQmgid4hGdEq8We7FrTD2ieuOKEc e2yltGyOkoxIfjo+grfeYqyK6/+wWw47d5LL1VUrq6B4C7AIBisGsbGyUOgYOrvBynep GAbjPFaPCXWUEz8aX3+N0YhJGtrzMO2I4Vh3LobbMoGUtprmllItxjFrKozYZVbtkhaw WjWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eCOtFU7GFvs0jIEchngf8XVXomOfZHlJRPaCvIYUixw=; b=Dw9NwbedZ61Ut6LzV0tQ8Ckfohur/oSYuua2rnEvdBHmJTqrHLQ57Zx1vI2FrtRSYj o6ptX/K8ws/3yb/E4ZehEg2XygccedJ4COOQ5RsN53Ss3UgYMiwcX6YfdQGexAvvAWLl zPw2VfQHZLUE124Uh34Z2DHaBaCAUj7NLY4fr7lL6Cj7e1KjZ+zE9X/dmNU2axFUma+A PlxmVDg2WoKJjRBF79olc9nLQalxusOwlBAauyDjTQgiBSSTCfJLL9d00f+ouyUWssT5 CLnoX+E7K39IJ6zAsQYpPPX4vqZa3nUt14Ee6mufmQW2oScKTuK3R+HdYXneKvi0MSfU B8KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mar6kklp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d23-20020a63fd17000000b0047688fc8acdsi34943662pgh.474.2023.01.04.05.07.19; Wed, 04 Jan 2023 05:07:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mar6kklp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234548AbjADNGg (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Wed, 4 Jan 2023 08:06:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233028AbjADNGC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 4 Jan 2023 08:06:02 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1579A13CC4 for <linux-kernel@vger.kernel.org>; Wed, 4 Jan 2023 05:06:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672837562; x=1704373562; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+SzowCr9VibyAQ07C1GMexR24eLRziCKELoBzuCji8k=; b=mar6kklpscJnyV9X3kjWaXwbNhi6WOphHVYnCbENYa2OdtqhaTkpciFA ze1g5UncePbnku2w2DHGXX1pcvy45W32RzqhQ//qXF1j8oalE6+w//cBp J6lQK0Wk4j8/+gP3K47fhjv5DYBq+Vj49VF5uhr1azj3gZftuNF2Bgzzk Tq/wOXbC1hYWcE0PFxoAxcZgtE6f7i2N05MouosZbjKJhiVKD0Z57+o2t b745hvZNA9c385kuRb/f6NHSj8souaReNU15AQilgsZzYeZ3nMfNNQ/nP ldXFfyx04UwGBjKeYrWHftwFrXM7ClYIoZH4HD4AlaqS72lBfG0zH1zlx Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="320639773" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="320639773" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2023 05:06:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="797529062" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="797529062" Received: from allen-box.sh.intel.com ([10.239.159.48]) by fmsmga001.fm.intel.com with ESMTP; 04 Jan 2023 05:05:55 -0800 From: Lu Baolu <baolu.lu@linux.intel.com> To: Joerg Roedel <joro@8bytes.org>, Jason Gunthorpe <jgg@nvidia.com>, Christoph Hellwig <hch@infradead.org>, Kevin Tian <kevin.tian@intel.com>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Jean-Philippe Brucker <jean-philippe@linaro.org> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev>, Rob Clark <robdclark@gmail.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Yong Wu <yong.wu@mediatek.com>, Matthias Brugger <matthias.bgg@gmail.com>, Heiko Stuebner <heiko@sntech.de>, Matthew Rosato <mjrosato@linux.ibm.com>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.com>, Chen-Yu Tsai <wens@csie.org>, Thierry Reding <thierry.reding@gmail.com>, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Lu Baolu <baolu.lu@linux.intel.com> Subject: [PATCH v4 06/19] iommu/mtk: Remove detach_dev callback Date: Wed, 4 Jan 2023 20:57:12 +0800 Message-Id: <20230104125725.271850-7-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230104125725.271850-1-baolu.lu@linux.intel.com> References: <20230104125725.271850-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754097413811138072?= X-GMAIL-MSGID: =?utf-8?q?1754097413811138072?= |
Series |
iommu: Retire detach_dev callback
|
|
Commit Message
Baolu Lu
Jan. 4, 2023, 12:57 p.m. UTC
The IOMMU driver supports default domain, so the detach_dev op will never
be called. Remove it to avoid dead code.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
drivers/iommu/mtk_iommu.c | 9 ---------
1 file changed, 9 deletions(-)
Comments
On Wed, Jan 04, 2023 at 08:57:12PM +0800, Lu Baolu wrote: > The IOMMU driver supports default domain, so the detach_dev op will never > be called. Remove it to avoid dead code. > > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> > --- > drivers/iommu/mtk_iommu.c | 9 --------- > 1 file changed, 9 deletions(-) Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Jason
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 2badd6acfb23..d5a4955910ff 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -710,14 +710,6 @@ static int mtk_iommu_attach_device(struct iommu_domain *domain, return ret; } -static void mtk_iommu_detach_device(struct iommu_domain *domain, - struct device *dev) -{ - struct mtk_iommu_data *data = dev_iommu_priv_get(dev); - - mtk_iommu_config(data, dev, false, 0); -} - static int mtk_iommu_map(struct iommu_domain *domain, unsigned long iova, phys_addr_t paddr, size_t pgsize, size_t pgcount, int prot, gfp_t gfp, size_t *mapped) @@ -946,7 +938,6 @@ static const struct iommu_ops mtk_iommu_ops = { .owner = THIS_MODULE, .default_domain_ops = &(const struct iommu_domain_ops) { .attach_dev = mtk_iommu_attach_device, - .detach_dev = mtk_iommu_detach_device, .map_pages = mtk_iommu_map, .unmap_pages = mtk_iommu_unmap, .flush_iotlb_all = mtk_iommu_flush_iotlb_all,