Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp180249rdf; Mon, 20 Nov 2023 22:15:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5aGwQRxVAcU/+YyO6/DXHGAvPn7JIEHMzDxawvSLg04sFsv7T3ak3yD9J7xMZfBTgIkxk X-Received: by 2002:a05:6871:4311:b0:1f9:69fd:d189 with SMTP id lu17-20020a056871431100b001f969fdd189mr927018oab.15.1700547356125; Mon, 20 Nov 2023 22:15:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700547356; cv=pass; d=google.com; s=arc-20160816; b=TbXw+jn7Qex15PZDHrfU5Zd8QDIP3FdZS4O6UVM+TKqh03NBvORjFvo92AjR/OJLUp bSRUpvWD0nVU3YCWuVENAZVOP+htEqLowYYcU/BMnQRvWSJ10fnpz3NLkE3Emsy+ebCg JNcz52XTja/fas/uYXMF1wM5KLBn9Tp0hT1nUMjBwXVNV1TsT/gEu+fKXqV19Yx1prGs 65lA9Wijjj+kQuI/CV7m0lkEbmt795Hyh6KokdhqRMumGW1G4OSXC2X1QSJHyDOUOuvu C6EfNueIyjzFBic9VCwZta4yorkDqJonitfN7wwaNmQyzbygmOMsjIZ03V/MUpJIrvUY jrxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=tEJ/0jhiLlAj5NKKVmbg6DnSqk+YY1VVE/Zsj54CHRQ=; fh=6jE13sGtEeeAKSPDmKmmgUZH5kWhjZsyBLm0bLmUfDY=; b=WHJURd45ihwmqI+JlCU3CWbwNTZTPl7RT+VT+BqSBOIzIpSqwmmY8iuu73mu4JpCfT mRsiv96YZv/wI+B4aGlPsTKLGwlBTSeN2XO58mSpnri71zImddeRNA7fhMdlYxjcxz+s bJOGhuhCXzn2AeisHOarI8IhqAmMz8vRGW2IzZDrFCAMrebraEqCo/j9ZBPLxo3TmmpV ABL0UT6+Hpineg2E7r5Uv2oK037OKq02Qb0ZZyRxY0sCqZQnrWTRxfWV27I+3dtaRPqJ wyrtWAh89l5WDRH4C03FTAL2mN51oy7mveS5KkQy19hNth9V/iTHInYBTCCdTJ90etJx OcgA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=iYNrkBcP; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id t184-20020a6381c1000000b005bda050625fsi9191481pgd.455.2023.11.20.22.15.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 22:15:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=iYNrkBcP; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 621FA80B8F3C; Mon, 20 Nov 2023 22:15:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbjKUGPa (ORCPT + 99 others); Tue, 21 Nov 2023 01:15:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230083AbjKUGP2 (ORCPT ); Tue, 21 Nov 2023 01:15:28 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2082.outbound.protection.outlook.com [40.107.93.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 984F0E7 for ; Mon, 20 Nov 2023 22:15:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UqCMM7CBOwmSXVTHx2KM+dao0wRRK0U2HCkUtSBzdMXebYO7mxqQE+V7gl0xO8CdfZ6gH+j1nXvLD+73TrZes44lAcbALJ1iP67mYGcyW0kwCk1x66Dbdht437kaSOyLts5RGOvcQug7aMkF5Y4dK9E5553QebdJGnep/Z6M8/El3tmo8K4S60u65uJLLa9Ewk8silKdk5cpBQOYJGt5JQy5PCU4YCuFyE5bIOaWc17Wxxosy9uOGT/oEpJbHCvdvF8fDGTtJIz0KsTfq25aA9gZWzO3nl6VUje9qSq0LHxi3fRDbrWgRihldyntxNgoje6VVMNDlr0bFC/HnJqhgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tEJ/0jhiLlAj5NKKVmbg6DnSqk+YY1VVE/Zsj54CHRQ=; b=X0z7HW2Xe3xvcKBZ6aNWXsgJCuPw8ySykO50uk3++RbdRdamo66kPYetUM4UiaCHgCYyA69vThx1NCinfHmuDdQqD1S4nFvGCTwFB0xNfTMgseCJEoWuwqKc3cwTMxsec3vNxwTjBbu+DLYHciKGox/FxFcMLEHXKSedIJAoM8dA/t+0D0BMzIgIBCIlzQuzm7NdGmTJIcbVlLR9q1VL3IVD0WHLGVDL2G/cH8aGE4sYoyfBX5e1vCugfvyW8WO7DHHqpz0RQiVdvVK1uUVPWGzloOzC+ayQ+/a8pBQzAzQfLxXlhtOu1GeAG0dxD5pdB0BrRFmLt12PnkaWesukPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tEJ/0jhiLlAj5NKKVmbg6DnSqk+YY1VVE/Zsj54CHRQ=; b=iYNrkBcP8/CTHXqEElvV9RmmrK8IjC/TuLCAl6rCXQguAtPelg2NaC6uVcY4ZQNnPZlK6gjJt9YzpoerBcjabcEPPO+Tt3CAKZf6FV0VBZjWqEStN0Wj3OUtXJWSZPYPMgGF03pMRJFHXH7MJUvAXe/UiYRlIrrQLMspWHK6Vzs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) by PH0PR12MB7908.namprd12.prod.outlook.com (2603:10b6:510:28e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.25; Tue, 21 Nov 2023 06:15:20 +0000 Received: from DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::befc:daea:28e6:32af]) by DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::befc:daea:28e6:32af%3]) with mapi id 15.20.7002.027; Tue, 21 Nov 2023 06:15:20 +0000 Message-ID: <2c8daf55-22f8-f79e-ae02-6fc8d505ade2@amd.com> Date: Tue, 21 Nov 2023 11:45:11 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] iommu/amd: Set variable amd_dirty_ops to static Content-Language: en-US To: Kunwu Chan , 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 References: <20231120095342.1102999-1-chentao@kylinos.cn> From: Vasant Hegde In-Reply-To: <20231120095342.1102999-1-chentao@kylinos.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0224.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:ea::19) To DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB6048:EE_|PH0PR12MB7908:EE_ X-MS-Office365-Filtering-Correlation-Id: 4187f003-e97e-404b-5b95-08dbea593d04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T2BGyR64IftisJJu+TGbF7QsvHT5wLsWTA0u9bYRNyAQ8ATjJ5rwp0/RWmAa8tmf8te8UXU4nfr8rRYRu9hIOhlsHCEffyol6dTZ4nL9pbIrsPMU79DhXnX6OxH1cTY+uZ1hQEUcBCabp2pk75EfL4T4EgvAUH0GFMv6nuRJ/wO2YwdB1ExRgVFn6hJzH7m6jFlvdLlTbcYtFT7wEwQHTBD0eO07S+kz8iXY53wf/svPThPY6TNv+EkDs6hYpbsnGRNYOdAK1++uEBAYdXSuY1cJXiK2aFpwi1sJQUaiGLoMrgH0PSUOC7zDlgAsKiLUE4YByWaVmsN4Ewe5KNSsq/2Uvg3pUTTpfjbr1A/MjDSccjPn2PPo7hhtiOcu93q4OJdF1BMHFFMF9IFkHvgWgH/ryXynCuRCkawWIVku2fxDWDqfWc3eeUsPPVvaUY1ab88GJ6PvHnKYwOk3vefQkljz/FWW+ahQ0P6PWSEanmO2f4wpJjHIbRluI8ZW0ENRToVQ0o+lnPc2Px8hoX7vh9PaJ9t5DqW3j83UxzKEtCoeIBIyLS+kXQ1oLuhAeEsGfL+X11fUFSZ0qrk+/UDVLQd3HZzPNYZI5VZz2n455scB1jxQSx+O8ujAcM2d8X5sv35ttchambUfw2jXbpqg1nHBJ1MIMVVrpmJDddqYc6rM09rL4VKeIDkIQmd0PgG31bt+CMykdS0EgDAtvutOcQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6048.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(39860400002)(376002)(136003)(346002)(396003)(230173577357003)(230922051799003)(230273577357003)(186009)(1800799012)(64100799003)(451199024)(31696002)(31686004)(86362001)(6486002)(6666004)(6506007)(66946007)(66556008)(66476007)(316002)(36756003)(2616005)(53546011)(6512007)(26005)(41300700001)(83380400001)(478600001)(44832011)(2906002)(5660300002)(4326008)(38100700002)(8676002)(8936002)(14143004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RXhXZndpT3NLMnB5eVMzU3J3eVRCeGpuZjg4M1BNeGtVeDFORUxBZ0ZQR0Rn?= =?utf-8?B?OCs3eUhFSDBMZkVycHo3dnN1ellVRjljeGNVcEhCbGJ3RGk2QUtQYlU5VXFF?= =?utf-8?B?cGk5UHFSd1dVTTU2OGovTncxTFBvVEZDUVVwck5ZQ0Q0RHZlMlpPY0hnYmI5?= =?utf-8?B?OW1DVkVEVUM5S29IemNuckREakY3azd3Vkt3Y3U5R3Evb3l6amMrL3B6OUpu?= =?utf-8?B?ODBoYzZVdHdjOFR2QXByYnI3Zzc0RHVvMUlpRWtHcE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0M1dndiS1FYSm9qVmZWRzhtZWNHN3Fzc0NLRUc4RGk2QVB6aXdN?= =?utf-8?Q?fpYbTZQgWGS156Tqm0Rw6U6Ev?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4187f003-e97e-404b-5b95-08dbea593d04 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6048.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2023 06:15:20.4534 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Wh61lM0dnE/v1oyyWHZuTyy9aF9u1lXHIaE7Pb2FNd7U18uSCOlWamltguPrk5q4hTugGWTCNafYXYxOXV9jFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7908 X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 22:15:46 -0800 (PST) On 11/20/2023 3:23 PM, Kunwu Chan wrote: > 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 Thanks for the fix. Looks good to me. Reviewed-by: Vasant Hegde -Vasant > --- > 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, > };