Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2103442rdb; Mon, 20 Nov 2023 01:54:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpCC254u270LWSf76OYbR3KWO6hkr8qWee9xXrcXMwEc38OdhCmX2rqaBabSi9BkeZIBCl X-Received: by 2002:a05:6a21:3403:b0:189:bde9:9cb0 with SMTP id yn3-20020a056a21340300b00189bde99cb0mr9314827pzb.27.1700474078919; Mon, 20 Nov 2023 01:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700474078; cv=none; d=google.com; s=arc-20160816; b=WdIM02ex7XiXhQG5KcPY2tzA7oiS8gKWMG6C+YEVZaJKPoo86RoOqeaoR+CqqZYc2y qp2vrIK0JSXkyqjK0/uJz9aJVXZIFnYHYmuhLgcmNyAI4ftKVvWxSiZNYX9FSgzCLqa/ y1f6MmLw4TpZ9E9unfRG+uvF8npz2l9WNY7C6qkXuxmEeNU/nsf+rM7LLt7gvX//Huu+ zcG2HaXpLrS5rosrwihz7kdgkRkiYADHxQfDcVfSuvCA92NrfoGlOh1wQX3ilGEGuedY wF81e3ee9DWn4UTmZF7lgN/e0A9f9fMFR4Wt4uaOSDOiXq43a/KVGZ+b45mTTWe4KXir u70Q== 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; bh=CkveyYE/UdFNHqSDmYsJ/81w+nuk+xJKGFnFgotLnNU=; fh=CpxYglY89S3G81/Q6FnJncWfZXzfemusfQMmuQ6c07w=; b=e9pacnfrc6inO+szRxOhj2ZbTolIF7D9MVbfBeqMkIszVIiZFXGFMyK9Da8xXZo1hL NC0bUP18RTLDrcn0W+t+Vc7jfRJZrYE33t11QgGZOdETyQRJdtE6UTjq6KGCzKCxEZoJ qRkxhTzim1ymgflKvZDTTykmQYOcp/3d3nCcCSWDsHGvtiTH1VrBPlnp50HM4nNXrCpC m0oLMgu1SD5sbGRIp/0NV0Hqf9VGZdDUbna/t6KGlZzamyDXu3II/Yh3Cq9zUaKf2sMI 94Ow7EAfvn3pDYgwsVfdbiBN9nzpWHWQUVIobA/GKcuMEyoUrSVMm4Chuk2wdRgZ9xV8 1W0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id z22-20020a1709028f9600b001ce663d7930si5710628plo.47.2023.11.20.01.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 01:54:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BA48C80B1217; Mon, 20 Nov 2023 01:54:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232320AbjKTJyX (ORCPT + 99 others); Mon, 20 Nov 2023 04:54:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232176AbjKTJyW (ORCPT ); Mon, 20 Nov 2023 04:54:22 -0500 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 108408F for ; Mon, 20 Nov 2023 01:54:17 -0800 (PST) X-UUID: 1bed3ad0837e41ccb08c40b898ce1a6b-20231120 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:6ed99b82-eeb3-431c-af0d-49f9253223d0,IP:20, URL:0,TC:0,Content:0,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:30 X-CID-INFO: VERSION:1.1.32,REQID:6ed99b82-eeb3-431c-af0d-49f9253223d0,IP:20,UR L:0,TC:0,Content:0,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:30 X-CID-META: VersionHash:5f78ec9,CLOUDID:235b9895-10ce-4e4b-85c2-c9b5229ff92b,B ulkID:231120175404TQAIPAGQ,BulkQuantity:0,Recheck:0,SF:38|24|17|19|44|66|1 02,TC:nil,Content:0,EDM:5,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL :0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS X-UUID: 1bed3ad0837e41ccb08c40b898ce1a6b-20231120 X-User: chentao@kylinos.cn Received: from vt.. [(116.128.244.171)] by mailgw (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1342836172; Mon, 20 Nov 2023 17:54:03 +0800 From: Kunwu Chan To: joro@8bytes.org, suravee.suthikulpanit@amd.com, will@kernel.org, robin.murphy@arm.com Cc: kunwu.chan@hotmail.com, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] iommu/amd: Set variable amd_dirty_ops to static Date: Mon, 20 Nov 2023 17:53:42 +0800 Message-Id: <20231120095342.1102999-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 20 Nov 2023 01:54:36 -0800 (PST) Fix the followng warning: drivers/iommu/amd/iommu.c:67:30: warning: symbol 'amd_dirty_ops' was not declared. Should it be static? This variable is only used in its defining file, so it should be static. Signed-off-by: Kunwu Chan --- drivers/iommu/amd/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index fcc987f5d4ed..9f7064360828 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -64,7 +64,7 @@ LIST_HEAD(hpet_map); LIST_HEAD(acpihid_map); const struct iommu_ops amd_iommu_ops; -const struct iommu_dirty_ops amd_dirty_ops; +static const struct iommu_dirty_ops amd_dirty_ops; int amd_iommu_max_glx_val = -1; @@ -2635,7 +2635,7 @@ static bool amd_iommu_enforce_cache_coherency(struct iommu_domain *domain) return true; } -const struct iommu_dirty_ops amd_dirty_ops = { +static const struct iommu_dirty_ops amd_dirty_ops = { .set_dirty_tracking = amd_iommu_set_dirty_tracking, .read_and_clear_dirty = amd_iommu_read_and_clear_dirty, }; -- 2.34.1