From nobody Thu Dec 18 07:21:44 2025 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 EF959C197A0 for ; Mon, 20 Nov 2023 09:54:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232500AbjKTJyX (ORCPT ); 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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Jason Gunthorpe Reviewed-by: Joao Martins Reviewed-by: Vasant Hegde --- 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); =20 const struct iommu_ops amd_iommu_ops; -const struct iommu_dirty_ops amd_dirty_ops; +static const struct iommu_dirty_ops amd_dirty_ops; =20 int amd_iommu_max_glx_val =3D -1; =20 @@ -2635,7 +2635,7 @@ static bool amd_iommu_enforce_cache_coherency(struct = iommu_domain *domain) return true; } =20 -const struct iommu_dirty_ops amd_dirty_ops =3D { +static const struct iommu_dirty_ops amd_dirty_ops =3D { .set_dirty_tracking =3D amd_iommu_set_dirty_tracking, .read_and_clear_dirty =3D amd_iommu_read_and_clear_dirty, }; --=20 2.34.1