Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3864901imw; Mon, 11 Jul 2022 18:11:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ssEdTVHrVK4id/MblWPFDWyhLpB+FsLOMjUcSo8qVYwXTG2XbzrMaklD+Egp2+DZLy2/Ud X-Received: by 2002:a17:902:dac2:b0:16c:6a1:692c with SMTP id q2-20020a170902dac200b0016c06a1692cmr20490351plx.19.1657588265414; Mon, 11 Jul 2022 18:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657588265; cv=none; d=google.com; s=arc-20160816; b=ZDdRIR/ny5EO0lz+GkaNDOd2p6v7JDTjtkE/IcqKX+mTvzGzTQqjGC37RaS/xUz3fg tFT8Sqb1brjaQYJ0NC5o0Kn4s0nyXuP/RZS+AjOSQSEOD535EzFGgf/coTVbXxaVD5Zs wN86wSlFMJd69caSZ+YfcEOFjkI0wIrJMSRTk6xCVKCqcR+eyvhCNMyNsDhB7DmtwU7T AxttX4FXLPPJ+rZvCMhPKQTPcmeG7H2tQjLM9UW/h3M1YORHxuMPMjddPH06vDRNPnwP bODsP0lY+3fwmCzlIyMWq2iBnV4FHzKqjhFagqm78umZCdwSgib9PCixXMYMmWH34Dhz KuzA== 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=3rmRKtiv7ueELcO5+tsA+v/DM+2QzNlkxKI4utk1P7I=; b=faLnYXxVPZae1tSNEvjSs8IxPJ4XaXpWvMeVHmnG0MVH+/+NaeuYqf1J4GWjcQ0jiJ iZeh+eod8328ZSlFL0ckj1w35zqT70GStDx/bdr+qgdLhj89CvhqTHb3dFS9XzBZMee0 nce0xY98CPvxyolKPISh8G+zep5iTVKa69jqY7EfyRNdRNXmS/m8dNKwu8N45HErdpQZ Rjp0ZHaO++TAUZ0bMZ0Qsyy6mEHMRAJbdpZ/3ApkSYY5YfobMHpRs+SNxMJutrLTT47Q fAB/t/ylSph/ecYGStGn6aJtWkqcPesl4pu3dN4ynRVYisG6lduePnAPwIPo1Tib5a2e Ne3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=M87iP3qV; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oa3-20020a17090b1bc300b001e887404411si18723938pjb.8.2022.07.11.18.10.53; Mon, 11 Jul 2022 18:11:05 -0700 (PDT) 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=M87iP3qV; 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 S229896AbiGLAP0 (ORCPT + 99 others); Mon, 11 Jul 2022 20:15:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230370AbiGLAPF (ORCPT ); Mon, 11 Jul 2022 20:15:05 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 334AF32BAC for ; Mon, 11 Jul 2022 17:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657584869; x=1689120869; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=94MIxLZGh7cLOMunSeLNvcXgG4W8P5quRK88jbR6hII=; b=M87iP3qVwGgymewFelUhHkm2v0mZ/qvzSfMN5Vy6HES9yD/JtW2HMDVE Ku0wHF6WyBq7kJirybAMj6IOzN2/4xU8BpXDSlUCHialpo+v8zwJSvAHX c7cNmR1CCUOUzOCpcCqKLewXCnfz3g9MkpxPb0+IqpfgtEZrulEK6jJ82 bgwhBtqBK7LiNa0UBX99H9xkg9mFjQSH2pKB+pTMukiw7GhmoHQqZw1Zd u38zP3TGwiNacPqyzMoEJvXvnmLq3ONcy1JJn7rDK6kdDhUtrKd7bfQTE 7cbuvFQoFeGMZ/V9xZuTp1wVHNN1Ofwy7ufTES/dX5QUeUwQ67UDsr1oK w==; X-IronPort-AV: E=McAfee;i="6400,9594,10405"; a="283555235" X-IronPort-AV: E=Sophos;i="5.92,264,1650956400"; d="scan'208";a="283555235" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 17:14:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,264,1650956400"; d="scan'208";a="592445861" Received: from allen-box.sh.intel.com ([10.239.159.48]) by orsmga007.jf.intel.com with ESMTP; 11 Jul 2022 17:14:10 -0700 From: Lu Baolu To: Joerg Roedel Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 20/25] iommu/vt-d: Remove unused domain_get_iommu() Date: Tue, 12 Jul 2022 08:09:03 +0800 Message-Id: <20220712000908.3431936-21-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712000908.3431936-1-baolu.lu@linux.intel.com> References: <20220712000908.3431936-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 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,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org It is not used anywhere. Remove it to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20220702015610.2849494-2-baolu.lu@linux.intel.com --- drivers/iommu/intel/iommu.h | 1 - drivers/iommu/intel/iommu.c | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h index df64d3d9c49a..56e0d8cd2102 100644 --- a/drivers/iommu/intel/iommu.h +++ b/drivers/iommu/intel/iommu.h @@ -725,7 +725,6 @@ extern int dmar_ir_support(void); void *alloc_pgtable_page(int node); void free_pgtable_page(void *vaddr); -struct intel_iommu *domain_get_iommu(struct dmar_domain *domain); void iommu_flush_write_buffer(struct intel_iommu *iommu); int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct device *dev); struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn); diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 769e850b9767..55a055a8ed4b 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -445,24 +445,6 @@ int iommu_calculate_agaw(struct intel_iommu *iommu) return __iommu_calculate_agaw(iommu, DEFAULT_DOMAIN_ADDRESS_WIDTH); } -/* This functionin only returns single iommu in a domain */ -struct intel_iommu *domain_get_iommu(struct dmar_domain *domain) -{ - int iommu_id; - - /* si_domain and vm domain should not get here. */ - if (WARN_ON(!iommu_is_dma_domain(&domain->domain))) - return NULL; - - for_each_domain_iommu(iommu_id, domain) - break; - - if (iommu_id < 0 || iommu_id >= g_num_of_iommus) - return NULL; - - return g_iommus[iommu_id]; -} - static inline bool iommu_paging_structure_coherency(struct intel_iommu *iommu) { return sm_supported(iommu) ? -- 2.25.1