Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7614570pxb; Thu, 18 Feb 2021 15:14:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJmDVIq4TCJYmr0uDPCSGXEw3amY2Lh+Fgh23lVa2Qy7rR2kv4ysf7Z1NZX9mm74FJktUd X-Received: by 2002:a17:907:d86:: with SMTP id go6mr5915375ejc.337.1613690051737; Thu, 18 Feb 2021 15:14:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613690051; cv=pass; d=google.com; s=arc-20160816; b=JsoiG13ufO2vdGsF/qDY44YSN3qb5H9oIrsTBN7Xf6R+VpeevUKSapk+rZP9lVSuPs pHIW9ZWvW6IKJig5sseK9BTwnNpgwfGLE4wR5zvSFy6eKE4nelgkgeWyykLm/ucqZft2 PLR0aOtT/Y/r61OXaSSPwVaxW8HL51MxPp5bLb/QzciO2EigsL99GymrlVIkStf3x+wt JtIXLRaTZxxpitgedtYbConuOqaMVXVQsOMwFf5WmQQHD39VXwBEa0DRCZ0xSIxM1vS4 WnTp+VupN9xMlYxbqqSjRoY7aWnajuKtCVtWqDExa9TxwujabcT4b8/A46Hw1r/JUadV K24g== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=8wU2m5o1ywvoNW73am5AcPi/RC4gBpJxmwAf07oLheA=; b=NbTIgkRfaIoUZqF3ZlJ+WA4+Z/BFIcy0WJZg8DgE3ALL4a7OGpoD8wjkkZVLyCuKWo /swrCQOtNCbCjkVQa6aOlBBRZf2Gs+lj9N3t+/Ouu7uDSnAeqZsB/q5vQtqWZM93KYmq vR9eqM37G3ZHzs+CmJG/6WsfHx4Hart0oxuvzxyFIshqujJDkg+v/T2ERIRGRQNm3kJ5 XiHOOE4LPhzlFa8rfCEs9ck25TbYYCE5DNabaD3U7jEkHpBvHTcoQDPSZBNuY0ARMBkO j+hGmTxkZuUuZHqFgn1qjsXB9iUfjZ7696+I5QYMCm8VLieFju+SdQ5zPM4b66aEb1ys Lm7w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=wo9F02Z8; 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.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amd.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si5619956edi.177.2021.02.18.15.13.46; Thu, 18 Feb 2021 15:14:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=wo9F02Z8; 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.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229683AbhBRXM4 (ORCPT + 99 others); Thu, 18 Feb 2021 18:12:56 -0500 Received: from mail-bn8nam11on2044.outbound.protection.outlook.com ([40.107.236.44]:15905 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229535AbhBRXMz (ORCPT ); Thu, 18 Feb 2021 18:12:55 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BYYvUsxYwQzq2QzYDvrg5DWQsqfgP6g/bhpGSq00za+8Tjgu9T7mud7fF/7VTobC3VkDKrRLzuR+xkYaOZtJK1I/hJq/rzm4Aeyk777LFmYYn3JXwrZu/usudOmVwpu81tFUQ303JidCRemv5AZloJCRdVF4LiSzd5M0z6XMFqRcgDa9s1AdZmJ6+LE91tA9l5Wq/GP7LDw1gHDKD63VjCMFNVrfuMZH78EdnHcJtzE19mgp2lNmza0ZJKGI23DURZSExjUEcjcKVUIMEVl4378YotL2OmpVj0QcKOeuU3a9DDuAEHOj1+ZokMJPBGVjHDv1XcORK7Z5b6lY7CaMSQ== 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-SenderADCheck; bh=8wU2m5o1ywvoNW73am5AcPi/RC4gBpJxmwAf07oLheA=; b=UyukgOllkpvM91LLcfrgus53ZK71TjgIXhYp4Gwu4aPYdfic6vWXvzlcSGsgSoEUe0PvalMaw+1HysntYqBE1/nt1cE11J4l5XVRgRFUtui/LECwn/nNnBI+x4wG1MC+/aqGhkH08HxaVdAaere4NnSv8UzI54R0e8HLGsbmyBCZy9bi/9vFJFgoedz8FcdUfBak6MqLbRYHMxd3XHa/euCvfHqQm6MYATeHM6FrPgU4RXOVQXVUjjW+N5JiTqpyQ4wUPxVYk06NQ62wqiw9yPwuwXZ33CApruiGrNf590NWUZVrnsEykGBWNcpM5K94MN1wAtdxhq7/dEaoAb/5ew== 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=8wU2m5o1ywvoNW73am5AcPi/RC4gBpJxmwAf07oLheA=; b=wo9F02Z8W0RX2WZTWWHP7Fd5hRnvg7+RXVq8RQ0uej4YCZ72IyNqEd28q+0TGOHa2I32W2Vj1ieSklvC0Ua8uHzgHrnarex0tm9peqM44u2fGDJjLB8y+qS123YRWeVfG/KwzEE0lYAcL7AhOIyeryRp3HhQNv9CSwXlIEd0DQ8= Received: from MN2PR12MB3022.namprd12.prod.outlook.com (2603:10b6:208:ce::32) by MN2PR12MB3101.namprd12.prod.outlook.com (2603:10b6:208:c4::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.25; Thu, 18 Feb 2021 23:12:02 +0000 Received: from MN2PR12MB3022.namprd12.prod.outlook.com ([fe80::49f7:4979:3a0a:4554]) by MN2PR12MB3022.namprd12.prod.outlook.com ([fe80::49f7:4979:3a0a:4554%6]) with mapi id 15.20.3868.027; Thu, 18 Feb 2021 23:12:02 +0000 From: "Wang, Kevin(Yang)" To: Nathan Chancellor CC: "Deucher, Alexander" , "Koenig, Christian" , Nick Desaulniers , "amd-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "clang-built-linux@googlegroups.com" Subject: Re: [PATCH] drm/amd/pm/swsmu: Avoid using structure_size uninitialized in smu_cmn_init_soft_gpu_metrics Thread-Topic: [PATCH] drm/amd/pm/swsmu: Avoid using structure_size uninitialized in smu_cmn_init_soft_gpu_metrics Thread-Index: AQHXBkhFDJucxY3wQEGNwt0cVYduT6peil0M Date: Thu, 18 Feb 2021 23:12:02 +0000 Message-ID: References: <20210218224849.5591-1-nathan@kernel.org> In-Reply-To: <20210218224849.5591-1-nathan@kernel.org> Accept-Language: en-US, zh-CN Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; x-originating-ip: [112.65.12.233] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 7dc278be-6896-49db-c89f-08d8d46299b0 x-ms-traffictypediagnostic: MN2PR12MB3101: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:186; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gZVADYGbdWeTHtk5Y/UfVTByS7K2ADI8vKISIr/VLNGKpMcTitrGucktdsnYdl6g6jTxGfGe4r/dZK0ZPLCQOflTvx9plVuMwCSjrbDv1sMXnWgXmYQ8NNA85mlpkLW5kuR9Oqjl9HHsMPzw0wU5OeIgkbBZI0HwjJvF0jyCK55CvnUPp+ApLnL1KzOWCOv74D+ucGBaX4bb571M/zAx7K+UM1toSQF66qJQZuI1B3ekE6TAFE/gMWwee9kC4hDjXfo5hCD6cOlWTs8D/zGPCB+e31FKu8B1SH6Ow5ApKV4vNa1nuu9ZleAZ3iVK1nbiTZGbDO4J0oIi71DaGsz4vEtwXohd8ho95YoP+M0oBTl7QBuyRZk5ukDhcMO+PiHNEuZj4dnx/ch/CnAAchW8JoLlVp7V1ioJEuxo4y9azPlJ+PkWXPU4ypp9NGG86hBNPxFLJuhT7zglYYUnJ1mkjl97yAhyJNgo+yNbCB093mK6HaZRJfJ1pVEAoKHLGLKMQ7VQhnRrtINR/5tuvdkY1cZi2OSYJfHRFeTuIlJqU8MW9J3deT2q8/Xva7sMTvaAWvUzBbNkBpSs2IqmvTirYXLYrFBmYwJCLP6Gm6RxS/PtWIYDoctxk8tV78D2iNbOwLAMQAG1gE9HG7oL7cULSv9IQM8S3mZ8XpksvvRPiHs= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3022.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(396003)(136003)(346002)(39860400002)(366004)(64756008)(66556008)(66446008)(66946007)(966005)(186003)(66476007)(2906002)(83380400001)(6916009)(54906003)(6512007)(76116006)(91956017)(478600001)(8676002)(26005)(33656002)(36756003)(6486002)(5660300002)(8936002)(2616005)(4326008)(86362001)(71200400001)(316002)(6506007)(45980500001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?utf-8?B?aDR0RFE0MHBSbUJlUlhKY1dTRlNabEdveGk2QzM0czF6YUJrM253L3ZDZzU2?= =?utf-8?B?Q0NvUnNQOGp0bmc3ak1OMG9pQ0lGNGZNWFJnZW1tZCswZG5jRTBWNUY1L2hu?= =?utf-8?B?SE12SWs4MHBPZXNwVWllbG8zUDJqVUNsZHpydWdidkE5NnRDaW5LczdGWFU2?= =?utf-8?B?eFRvMTJleFpVbUppaUVMdm9iR3cramprMmUxc3h3d0hLZDc4RlRKdXdwaFdu?= =?utf-8?B?OFM3UmZ6dlVQcm1LL2tQZjFzRlpZNXUxeHdxV0ZWcExTUDBPSVJjSklsc3Nw?= =?utf-8?B?RUt4S0VoajJlTEpnSHprMHJWdDBpU2RiOU02LzJXeHJGbDhlQnREbERMZG5F?= =?utf-8?B?OUQrM3ovdExyVVFXZ2RPekhqN3g1c3VXa0NMZmV5NVdxZUt6ZS94bC9Md0ZH?= =?utf-8?B?SG1TTHFQM3dNZzFKd1J5Z01Qc2QwZFpFN1dXbzNFcjJmYWNpM3d3OFN0VVdK?= =?utf-8?B?aURvdlVHTmZTQnl3RXAvVFAxRDljRm5hSlV1YUZpTllheGd3R0ltZFZURlll?= =?utf-8?B?ckNPNFNBL2hDTnVKaUc3eCtlOFQ0TmVkc2U2STFsUTNFZnpkamJBckE1aGQx?= =?utf-8?B?bVlzZ1QyT0YzSmlHRXlFVDV6Zk5ld3d6WmRLUUNXbmNYQi9iNXgrcWE1YkJZ?= =?utf-8?B?YXFrZ0ZBOE9MTWJScWxGd1ZVTXp6eGNJM1plZUZJdTNDN0dEWXdJZFNxZ0pa?= =?utf-8?B?Qi9xVCt0MktVRjZaNm9UbkZxckwrcG82ZERmdXJ0ZmtJV1Jvem9FaGVMc2dH?= =?utf-8?B?bWlaZW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djZvVCtn?= =?utf-8?B?Q1NkU256MTRZQW5RbVFLbnUybWNSMGorcHVHY1lyR3ZHc1ZxZkRTbGZWS0hO?= =?utf-8?Q?a9N40JXmK5La02P3ug+3JGkOKgPsfv5tUkvE2Cq?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3022.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7dc278be-6896-49db-c89f-08d8d46299b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Feb 2021 23:12:02.2718 (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: WSXzk9jxwfxsvY1FlcQbh8jp0tsQhdGRWBBuZdKCQ5wT6VUXzRQo6tz+wDF4SKw/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3101 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dGhhbmtzLA0KDQpSZXZpZXdlZC1ieTogS2V2aW4gV2FuZyA8a2V2aW4xLndhbmdAYW1kLmNvbT4N Cg0KUmVnYXJkcywNCktldmluDQoNCj4g5ZyoIDIwMjHlubQy5pyIMTnml6XvvIwwNjo0Oe+8jE5h dGhhbiBDaGFuY2VsbG9yIDxuYXRoYW5Aa2VybmVsLm9yZz4g5YaZ6YGT77yaDQo+IA0KPiDvu79D bGFuZyB3YXJuczoNCj4gDQo+IGRyaXZlcnMvZ3B1L2RybS9hbWQvYW1kZ3B1Ly4uL3BtL3N3c211 L3NtdV9jbW4uYzo3NjQ6Mjogd2FybmluZzoNCj4gdmFyaWFibGUgJ3N0cnVjdHVyZV9zaXplJyBp cyB1c2VkIHVuaW5pdG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