From patchwork Fri Mar 31 04:54:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolu Lu X-Patchwork-Id: 77528 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp326295vqo; Thu, 30 Mar 2023 22:07:06 -0700 (PDT) X-Google-Smtp-Source: AK7set8okhEfiM40kXxVz6duytCUvtcySHe8jCQ/6Eo/PnMvOkB5ezsznuJ+s/1mtU/u+eBFDJsy X-Received: by 2002:a05:6a20:6695:b0:cc:6699:dd8a with SMTP id o21-20020a056a20669500b000cc6699dd8amr25016951pzh.45.1680239226120; Thu, 30 Mar 2023 22:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680239226; cv=none; d=google.com; s=arc-20160816; b=mp23/Euy5/xCSnPs6syKkBQ8Rf65/GsXuzmBO4QrkbjgV8M0Az1ty+ipCzoR8gE3CT Rsk0S9+mjoaQ43AWcI1cTcGpd8pfnSQAYORdc1LONnB4i2aexWZGVveufQFUQYEM3zaF Ms9Be4ljy/u8kZGblOek+ZP66s+UaD9kvFk2mQN3fGf23y3K4b/SrSSe3kCEEOCuo4P9 i0HX9Ta2/KEp389jLBUyHWxnzWTGGgWwk02XoKqdgb1BSLcRyiYNIWvK/QDrBNqUI8k/ ANhhB7XcBhIgDN4Q4NUxvBQZgg4ncjEE04ob7ieZFrjs3eC4Mt1yMnPWAYlC8LUAvCHt fvyA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ZbJJqvFrA8WnqNnuGqHorZsMAaR5ekbTSFQ0EdMRjWQ=; b=qruKTpq2fB63PbM78gqstZCQxmmQwWFUKpkisr01CJkE+3GWquIa+p2uWsFVF5+DcC iMvoTY8wj77OnKVopvZF7ghEet8WhRcVTOB1Tw9hEz1/IVqaeDXkPsJzQPMXXI1OLqc7 wRifPLjpjigMqdmvZpscVuM9+KnSh1ZeXsk4WWC+CrCl7EjNzSf6ZG01UBLhUQklGV2k Por9cW0B1IoLb8eA6OS+lvei3L1rLoTYPc29jGMgqq4OrMAumj3zqXRuoTpITV9z+I/N I0645nlr8GBoAwVBwHwQvbsCwULaZSuabNu5ThBqKPAJ/NmcKei/tFsVjnqzyJ5MxpSD 2kYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TCkomDbv; 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 e13-20020aa7980d000000b0062a43ccaba7si1521975pfl.313.2023.03.30.22.06.53; Thu, 30 Mar 2023 22:07:06 -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=TCkomDbv; 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 S229646AbjCaEyw (ORCPT + 99 others); Fri, 31 Mar 2023 00:54:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjCaEyv (ORCPT ); Fri, 31 Mar 2023 00:54:51 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD2331AC for ; Thu, 30 Mar 2023 21:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680238481; x=1711774481; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fd75vsjSJy6EbCzI5Lu++FGJSnhh9YekoxFeV38EkyE=; b=TCkomDbvtHWCStYWvcdTP7if6KlqkhzZ6dxQ6zn7lUCpb6lldzeOLZND kxivmuP5njSGdj3Ht6EHDI7fGvqtjBPg0Zq+EIwhSr5l7YD6K+ADj9lHt my3EHIL6MXGHPkBcYVron6jtbVzsCc1abEuG+MgvXH0zSRYyZAIHhbY+s jqsCqKpgs4Njbvw5AtLsGkcRctJIFBhKWQ7HVANPg14gOuR48xhAyoDCW nnpWf/aYi71xgAwU71MjGGVnNP1+hXpwmeJOFkMFI2UxnSCKnZxuiDQql wJ5nY8Vka5nJXFMP46VnvU9NAHL+3Q7jLxBhjAf2up7X8PCw6rj79gjEn g==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="427635890" X-IronPort-AV: E=Sophos;i="5.98,306,1673942400"; d="scan'208";a="427635890" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 21:54:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="749475185" X-IronPort-AV: E=Sophos;i="5.98,306,1673942400"; d="scan'208";a="749475185" Received: from allen-box.sh.intel.com ([10.239.159.48]) by fmsmga008.fm.intel.com with ESMTP; 30 Mar 2023 21:54:40 -0700 From: Lu Baolu To: iommu@lists.linux.dev Cc: linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH] iommu/vt-d: Remove extern from function prototypes Date: Fri, 31 Mar 2023 12:54:52 +0800 Message-Id: <20230331045452.500265-1-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761858527011871749?= X-GMAIL-MSGID: =?utf-8?q?1761858527011871749?= The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from drivers/iommu/intel/iommu.h as they are not needed. Signed-off-by: Lu Baolu --- drivers/iommu/intel/iommu.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h index d6df3b865812..f843493dc4f2 100644 --- a/drivers/iommu/intel/iommu.h +++ b/drivers/iommu/intel/iommu.h @@ -796,18 +796,18 @@ static inline bool context_present(struct context_entry *context) return (context->lo & 1); } -extern struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev *dev); - -extern int dmar_enable_qi(struct intel_iommu *iommu); -extern void dmar_disable_qi(struct intel_iommu *iommu); -extern int dmar_reenable_qi(struct intel_iommu *iommu); -extern void qi_global_iec(struct intel_iommu *iommu); - -extern void qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, - u8 fm, u64 type); -extern void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, - unsigned int size_order, u64 type); -extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 pfsid, +struct dmar_drhd_unit *dmar_find_matched_drhd_unit(struct pci_dev *dev); + +int dmar_enable_qi(struct intel_iommu *iommu); +void dmar_disable_qi(struct intel_iommu *iommu); +int dmar_reenable_qi(struct intel_iommu *iommu); +void qi_global_iec(struct intel_iommu *iommu); + +void qi_flush_context(struct intel_iommu *iommu, u16 did, + u16 sid, u8 fm, u64 type); +void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, + unsigned int size_order, u64 type); +void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 pfsid, u16 qdep, u64 addr, unsigned mask); void qi_flush_piotlb(struct intel_iommu *iommu, u16 did, u32 pasid, u64 addr, @@ -830,7 +830,7 @@ int qi_submit_sync(struct intel_iommu *iommu, struct qi_desc *desc, */ #define QI_OPT_WAIT_DRAIN BIT(0) -extern int dmar_ir_support(void); +int dmar_ir_support(void); void *alloc_pgtable_page(int node, gfp_t gfp); void free_pgtable_page(void *vaddr); @@ -838,9 +838,9 @@ void iommu_flush_write_buffer(struct intel_iommu *iommu); struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn); #ifdef CONFIG_INTEL_IOMMU_SVM -extern void intel_svm_check(struct intel_iommu *iommu); -extern int intel_svm_enable_prq(struct intel_iommu *iommu); -extern int intel_svm_finish_prq(struct intel_iommu *iommu); +void intel_svm_check(struct intel_iommu *iommu); +int intel_svm_enable_prq(struct intel_iommu *iommu); +int intel_svm_finish_prq(struct intel_iommu *iommu); int intel_svm_page_response(struct device *dev, struct iommu_fault_event *evt, struct iommu_page_response *msg); struct iommu_domain *intel_svm_domain_alloc(void); @@ -887,8 +887,8 @@ extern const struct iommu_ops intel_iommu_ops; #ifdef CONFIG_INTEL_IOMMU extern int intel_iommu_sm; -extern int iommu_calculate_agaw(struct intel_iommu *iommu); -extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); +int iommu_calculate_agaw(struct intel_iommu *iommu); +int iommu_calculate_max_sagaw(struct intel_iommu *iommu); int ecmd_submit_sync(struct intel_iommu *iommu, u8 ecmd, u64 oa, u64 ob); static inline bool ecmd_has_pmu_essential(struct intel_iommu *iommu)