Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp780467pxj; Thu, 17 Jun 2021 13:47:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsDpldZpPmy6PikddmouKT/CjgeVusveJGyJSHvXig5Hz/9HbqPbGq2o8xzC68jX1/ti3J X-Received: by 2002:a17:906:6549:: with SMTP id u9mr7081190ejn.506.1623962840266; Thu, 17 Jun 2021 13:47:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1623962840; cv=pass; d=google.com; s=arc-20160816; b=R6hySaHaA1qJsH+L63Oo53HiiWEXOCEbYdijHO4rlQ0MXDdXIU6Z99+s6LomyCKn/i LnL5/TsgCdDbr0jfV27DjSnWY5mSGH2y/33GrTNFjv176FKd5gVGGOUhUREKXAcg6XP6 79qJxTq5NBCSKFcA3lXIMauXYqSSAZh6k2GAn0f3IcZqU2aHRPX7/01ZvyPIr8ID3DPt 8Nq7pJzl0q50yqPb9vKqL6pW/ElsdEeQuzFLnZ9KSr06U3iA4mvzjvFOVNiYXuALH+MN h0j5jd9L8pXIjmm+uRucjtSGLiDaNlH4z5yy4dtzi4uNe0HjEGbdSFPU6ApjaeIZOXU+ C5vQ== 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:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=U8Kb/4XtNIVDB88Egw+qJJFrE4Fk73/8moR8CjTK5G8=; b=bX1VOQ1WCEooYE/UnV5TFGcELEVklB/SaEjR9VPYHV5On6q1FSFRVgsu/iJzEmH77F zYaZ/enyP0N3CWAT/ZzUIoyKfgLuBWyicdIbUtOvkLjVqF9JOnEET2gssNe4nHNm5uC6 X/DBV2lDL6Ipi0d212zoC8XknyinfjID19W+RRtEowQXUdE50bjx9SlgLzPTBP6d+731 Bzxcb9eyQqj5812L5gtMgUg1OnDI02wwss+9o3Qzt/JLvxdm+/645FR622MFXZk5zBO0 9EM01lKVAVVzziPVaogbn2jiQ8B7dCA6KdnxT2ER9B1uToG9bDs/YF2LiDWdKOn3ORHh xEXQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=N5rK+OAK; 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=QUARANTINE sp=QUARANTINE 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 y15si4279465edc.87.2021.06.17.13.46.33; Thu, 17 Jun 2021 13:47:20 -0700 (PDT) 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=N5rK+OAK; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232972AbhFQTGl (ORCPT + 99 others); Thu, 17 Jun 2021 15:06:41 -0400 Received: from mail-mw2nam08on2050.outbound.protection.outlook.com ([40.107.101.50]:52097 "EHLO NAM04-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232803AbhFQTGk (ORCPT ); Thu, 17 Jun 2021 15:06:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B2EqVqqX0IbeTKjBFhgMSw39JtDjXMBm2DVawWxb9B6tsNoi7pLhogpVGd9Z7WcgJ8vHPdenbwmsaXyyZnWJrd5ESUWY6Vml9AHKf8li0S8X2sfDb6Oo0RQxtJRBiqkTKzukfCxKAIJo4ihQ45GaOWGKqFdsRYPwYtUy99C11pP9Bx8MFaHzVRtK7CLtlYxfMNEiWoIKP1IKpD0yEpelOzWM61MJTLMtXSwoerXXkRgxzxO1ZidvxTIoCvjhDmOhFZel56lUXdbUKqlC2Y0VO1wOt4dVgcS0kIE5rt849q8IxsJ7VEU4XCzFHYAc59GYQjxcDw/ICgR5uxWQBunrtA== 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=U8Kb/4XtNIVDB88Egw+qJJFrE4Fk73/8moR8CjTK5G8=; b=lCceHpmlGAAXSDDRDdDTtnE2jihZeCvPhV50bh6HPbSgT39Qy8GzXWJy6DNMm/DfJuxTW6Ma/zUbJO48a4G5kULOaMThs8PRXI3Mx7eewtHeDGPMjfHOO7q8e9IssS4atbAwzVKTMcvfMtIRVmRR6srJS1Y6vppyzNkMHnsxWbD5a1wNXayaJsApvprFzsR8IrW7snWKcxuHfxm6zBaWGqhTjLB4m2pMLR+5jrGp9dyD0VUsJ6VXrdc3bCyjuirNJn4m803aDTPpe+han/49qTZ+Tg4wS58O4Zpfw2EHGk2IBn2jf1ZfN2Uq5NUnxUFs5UNreKNJJfs6c+sANb/CLw== 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=U8Kb/4XtNIVDB88Egw+qJJFrE4Fk73/8moR8CjTK5G8=; b=N5rK+OAKS2WaWms6c/T7nK7716MS0BfbuaRgeRphNeOwjB0fvhnyQUR9+Y5AmUWklWMkZqKM+AGWCv3MQFJo2/uWalIh6dmT1/D8hUq3qk6KlaNcXY4NRGb2txTnILopCFcFHthMOQfIdHrUXXGlLibcl5gjcrsJg4Filxvy2fs= Authentication-Results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=amd.com; Received: from CO6PR12MB5427.namprd12.prod.outlook.com (2603:10b6:5:358::13) by CO6PR12MB5410.namprd12.prod.outlook.com (2603:10b6:5:35b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 19:04:30 +0000 Received: from CO6PR12MB5427.namprd12.prod.outlook.com ([fe80::401d:c7a2:6495:650b]) by CO6PR12MB5427.namprd12.prod.outlook.com ([fe80::401d:c7a2:6495:650b%3]) with mapi id 15.20.4242.021; Thu, 17 Jun 2021 19:04:30 +0000 Subject: Re: [PATCH -next] drm/amd/display: remove unused variable 'dc' To: Pu Lehui , sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, Anson.Jacob@amd.com, Nicholas.Kazlauskas@amd.com, roman.li@amd.com Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, zhangjinhao2@huawei.com References: <20210617011632.187690-1-pulehui@huawei.com> From: Harry Wentland Message-ID: <7758a4ef-0b8e-8873-fac0-7db7a2f6402b@amd.com> Date: Thu, 17 Jun 2021 15:04:21 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 In-Reply-To: <20210617011632.187690-1-pulehui@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [198.200.67.154] X-ClientProxiedBy: YQBPR0101CA0106.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:5::9) To CO6PR12MB5427.namprd12.prod.outlook.com (2603:10b6:5:358::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.50.3] (198.200.67.154) by YQBPR0101CA0106.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 19:04:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 30254615-3f64-4439-588c-08d931c2bbe2 X-MS-TrafficTypeDiagnostic: CO6PR12MB5410: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:46; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Mkd7MeD2IIPiBHfpRA8WaSlyh78SJTbLRGVfsJA5Qlb/nZVGy4bU6DpQ+biKCdGuU8Q6Oks/uV54ICQ4KJxZc0GadIDbEBvZfm08P5WWCkctzDy1KM+7Usw2qIkxACoCV1fmSWZVBBVjoRpEYS3gqlP1XZ21f/OpHfCD9gLoGN8UCobQNs+IXDJwtX55RpLviHKapgUhUdj09xgpOrXlNGSgOG2laQymKKhNY5kJqlxIL6IVUH5fbHA2TbMdE427pKsFG6RBi49rzLXBXzB0vKF/2WrXKjYeOWaGRJHLWadpbLhFX2E5VJBan+qyeZbPLBjzwXr9SuBd4LKc1VkuImbOxwVrrEuxKYy1+1UyEHnbY/VjIC1FtcysxAh1ESmfjNFHhJotu8iz+xgUbVU+UkDyGfsltcosdMP0sWY0UKKvG0C78X7BHGfvJXxFiW4OXiflO/iLhmgCNMoWHbxepXbMPUhSSVyWCxrX/8VD7VeJyqSELNlD7UdLeUrh9DRPJyZ0WjSA/HUoImElhus1O8Vg+ACFeeE93n816+AfqtGedMb6CHMN9CxxN4WMvjvTJ3dHk/Ldwx+soK4x8jE6Xa4pKM6tbeijmInfEVRJ4lrGftEhx3H1hdxCeyvr+09Q9+Zx/JYA2XTK1q8bl6BjCgpjW7uzZWCf4jtsGvhZiBsvsiKmUNtSE3M1sTYiHUdpRNxc93ObsZzNV+2woPdIg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR12MB5427.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(396003)(39860400002)(376002)(136003)(366004)(956004)(2906002)(6636002)(478600001)(316002)(86362001)(83380400001)(44832011)(36756003)(186003)(5660300002)(2616005)(6666004)(8936002)(8676002)(4326008)(26005)(16576012)(16526019)(31686004)(31696002)(66946007)(66476007)(66556008)(38100700002)(6486002)(53546011)(921005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Ykt1c3NaaXFncEswQ3hNWEtSTkxYQnNCZ1Y1bWM5YTFjY0NicFZhUHlNQUQz?= =?utf-8?B?U2gxMzZ5YkNGT012aTJ3NDc5YVB0RjRXTVJiVkZEVjI2bU1BbVhndG9ydGVE?= =?utf-8?B?UUZBZElYTGRtUkk2YzlwVmZkTUMxTDZVNXdXYWFhakVaRWJPOVRwak5aZTFl?= =?utf-8?B?SlpDd25oMnlKcWJod1BTLzZHeG56MmNJOTdhU0lZTmhhbXVRV3pxVDhhOGpp?= =?utf-8?B?YitjMHhFVFJPTzlyS2RJaGcyUUNRcy9LSGN5c1FDOGx3bmE0ZTkxdDQrVGls?= =?utf-8?B?S1lkUTN1Z1dBb0E1S3ByMUtoSzJTblZSemt0ZGhqbjdMTFVIRHlkcmg5Y1Rm?= =?utf-8?B?MlVKZE8wVVlic2JxTVhyWDFTWmRtRy83VStsSnI3YmlOTXBob3BaMEVZb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VDalZjS2JlRFYwSjlR?= =?utf-8?B?WktLMGsxQ2F2SHZJL0NEQUozLzg5S2xUMW5KWTZKRU00emNlVHFhMDE2RmJs?= =?utf-8?B?bWs0c1ovSStiMytlWVdvcStsRno4Wm9FQy8zU1c1UnlSS3Y5RitvbkR4bmNt?= =?utf-8?B?bnUyRWFZbnVqNWNNc1lPOVE3aFQvNUpRQ2JYeXhmK1ZUS0pRYlBqc1drTTZv?= =?utf-8?B?VGsrVU1vOEtuYlRXdjNlUXErdzFNM1NIcUdRcGEvb2RBV3dGYXRLa28rYUxw?= =?utf-8?B?SklvdVU0Yzh6YUlJbThiM3Vnb0xwcFdpUkNvN01XbGdyalRnTVJUTmNOTmVF?= =?utf-8?B?RVl1N1B4MWw2Y0RkNDhvTDkzRkJPbVc5Yi9JcUNVZDVQS0txck1VdEEzY1Y1?= =?utf-8?B?M3gzZkdVNVp0elFteXlUdC9vWVdZUXB3VnBlQUNiSldQQmhDcWU5RjN3Y2Jn?= =?utf-8?Q?mccwaVnSN57b/GAELGtfja2+4JBLZnTYuBgUwdx?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30254615-3f64-4439-588c-08d931c2bbe2 X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5427.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 19:04:29.9964 (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: VVPQ/p0UVb1AeqgcLHVAITRypeKDYUntKHCCF4bfAAukaYF9t9liGJDPUXhFzH4mAqaRPAp34uyxUUdFufhhDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5410 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-16 9:16 p.m., Pu Lehui wrote: > GCC reports the following warning with W=1: > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_psr.c:70:13: > warning: > variable ‘dc’ set but not used [-Wunused-but-set-variable] > 70 | struct dc *dc = NULL; > | ^~ > > This variable is not used in function, this commit remove it to > fix the warning. > > Signed-off-by: Pu Lehui Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c > index f7c77ae0d965..70a554f1e725 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c > @@ -67,14 +67,12 @@ bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream) > struct dc_link *link = NULL; > struct psr_config psr_config = {0}; > struct psr_context psr_context = {0}; > - struct dc *dc = NULL; > bool ret = false; > > if (stream == NULL) > return false; > > link = stream->link; > - dc = link->ctx->dc; > > psr_config.psr_version = link->dpcd_caps.psr_caps.psr_version; > >