Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1905989ybv; Fri, 14 Feb 2020 08:02:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxJzcpmmE7+eruylijVGsN+ZdzNtcQmPaJj64sIGW1kirbtDpB9sk3vjQo36xGU1U3wTzYZ X-Received: by 2002:a05:6808:8d0:: with SMTP id k16mr2343397oij.68.1581696170887; Fri, 14 Feb 2020 08:02:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581696170; cv=pass; d=google.com; s=arc-20160816; b=jzeJqezNgDMFmJCz0IIFCiUoidJRAIVGqvQtn1UTVbCq15C8TbtDDwWp7P19UKh5wQ mGprlzslGohzw4Ki6S0YPedtTsFpXfi9POamd/B27R+rFLjLKPykgHVLE3JTx7lCJ7R2 oQ563mJJVXPSSjpUHDIqVstZgSW+WuE3xmRIiJ4S4ruQeiSIG4JPzjxu0IaiBSDAU8vn o6DINGsBa+krV8TDAgRw+lmqtMr+sxobFfDE/q0upo3tAcqcCmoRIgTvS+M1Vf890+et yZDWO3eUo8n3Wl77+xC0U8EehJD4rxfEsmbS0dLakwyfkMkVAN4WaBzlMpXZBuGwo6ez dhVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender: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=x1NmVgVHJPBjz5DDw59G4emVWseGWn1aWJozqn0khA0=; b=Iqxa6BQ3u/RCqu/rQHGpGyB8ZftoXeuuHML991cZUaEuzGfjU1z0kUDMr+v3I2Zl/V offc8BCOCGTIr09J2bVfP1neoj+XE2z85g/aOZFGTu0UarwfqyrrTYQRXetLAfIfbx8M OytSMAKntIJayxISw7nixHjxAACCw7rxuMP62oDbKbMRKkO0oi4Pt/EsO7yTZyRO/Z1L gfWFm6ieCzdpeEyyMdYOyrJTapZivRaI7zQOONbo708B6Ja0RMM/lVPMKa43BDMpsp1a 7V/dQZ8WqfXLZ1NeiW2tcaTsvg6Gl39ZsaEkYYsy6EgYfhUN9ysOan4A0u5xEHF4T0bv k0/g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=L4ToET56; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n25si2912380oij.175.2020.02.14.08.02.34; Fri, 14 Feb 2020 08:02:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=L4ToET56; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387752AbgBNQBJ (ORCPT + 99 others); Fri, 14 Feb 2020 11:01:09 -0500 Received: from mail-co1nam11on2043.outbound.protection.outlook.com ([40.107.220.43]:6073 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387652AbgBNQBF (ORCPT ); Fri, 14 Feb 2020 11:01:05 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aqxPY6eTeSGI/N/1Gh4F7aLmbhABKSSXWTlAnGBWkM9zJ7wKTG0ZAxgFvyc1fxdwXDZik7lxR81TDTxqUoxctNt20kuxT28vrqMyipH49B2NYsKZIrnvziS0lbvLZkJ6R1x42TF4Y2qvGaSls/KDKKF0JmGJZ9C+huEFCeNpLRMEvayNmBDHG2wTQ9PsLEx7qFlpPTb3Idl+hwOmcn6EdpMfjtlEET/BuuflUpflrlotQUcQqkvzwM24yOxLE1EFeB+0Oh08FsDzPWgplCOPC8j+QYVrr/ZW4fo4cwZAn50mGr5RjUBEMlBgMAoFJO+6/too94McPXUWoWgy8h6d2Q== 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=x1NmVgVHJPBjz5DDw59G4emVWseGWn1aWJozqn0khA0=; b=MDrYQnvaK4KiUXHm+jje0bbb8jTu98IxEXgvEAg/ZE61el0g34iqbgVGluaklHz7pgyG+aBqwXKziHMkZTBVSgW9XYBGargpBUuPmLbETOEBOeTgNS8xJ3JF/u2HSgW60deBCPTKfva56ZBUo83ub41QHHXDep0Q1flN0QGgZsExTcSuEhLnrfvRLEttqAHWhJXqgFu7/z6fxCm0asaNzsdNJRSCW8SrIMD1nAmsjoXiNJIBWBhZBPTUYUU1iKrA7tjpYjuLjMWW53+C9rC5l7EruhHRD91qsUPCIz4+0lqNc7fDqZrEGFb/2ENKdOuEpmDyFnCMan1xW91u+tCr7w== 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=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x1NmVgVHJPBjz5DDw59G4emVWseGWn1aWJozqn0khA0=; b=L4ToET564guG3PHNnfS0P/jjByUSSqvrPx7Dz2NhoH5hI1tla+W3YCklxeRz6CfAh5fG6E4wk2/r4qavRc4IGOXlmADKR1nPAQboVAjewu2oKOn6aweagDte9KRDMRs7Vhg6uTU7yhC7ctAyXzecCfKjIgWDBs4urRaZvTX+7u8= Received: from DM5PR1201MB2554.namprd12.prod.outlook.com (10.172.92.14) by DM5PR1201MB0012.namprd12.prod.outlook.com (10.172.89.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22; Fri, 14 Feb 2020 16:01:02 +0000 Received: from DM5PR1201MB2554.namprd12.prod.outlook.com ([fe80::c4c:bafd:5833:2b51]) by DM5PR1201MB2554.namprd12.prod.outlook.com ([fe80::c4c:bafd:5833:2b51%5]) with mapi id 15.20.2729.025; Fri, 14 Feb 2020 16:01:02 +0000 From: "Liu, Zhan" To: Nathan Chancellor , "Wentland, Harry" , "Li, Sun peng (Leo)" , "Deucher, Alexander" , "Koenig, Christian" , "Zhou, David(ChunMing)" CC: "clang-built-linux@googlegroups.com" , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] drm/amd/display: Don't take the address of skip_scdc_overwrite in dc_link_detect_helper Thread-Topic: [PATCH] drm/amd/display: Don't take the address of skip_scdc_overwrite in dc_link_detect_helper Thread-Index: AQHV4w3nrdEjDXoM7k+tBRh46kQ/F6ga2T+A Date: Fri, 14 Feb 2020 16:01:01 +0000 Message-ID: References: <20200214062950.14151-1-natechancellor@gmail.com> In-Reply-To: <20200214062950.14151-1-natechancellor@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Zhan.Liu@amd.com; x-originating-ip: [165.204.55.250] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 6ffdb09a-7ea3-4819-cc1f-08d7b16716e7 x-ms-traffictypediagnostic: DM5PR1201MB0012:|DM5PR1201MB0012: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 03137AC81E x-forefront-antispam-report: SFV:NSPM;SFS:(10001)(10009020)(4636009)(136003)(366004)(376002)(396003)(39860400002)(346002)(189003)(199004)(26005)(186003)(33656002)(4326008)(2906002)(52536014)(5660300002)(66476007)(9686003)(8936002)(316002)(81156014)(86362001)(81166006)(66556008)(7696005)(54906003)(110136005)(64756008)(76116006)(45080400002)(55016002)(6636002)(966005)(66446008)(53546011)(66946007)(8676002)(6506007)(71200400001)(478600001)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR1201MB0012;H:DM5PR1201MB2554.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BawvpbGpghwUyTJwki8NC9In2ZKQuSMjrRh1hGnQAn+ehswAwnP3bidg7Jy8EuabQiLWrBDv1LmCcfZzNUq7UWno0APNlGd0CkGqyZ9rRgGccjYnMAvWZdtMupt25EmeZ2Pflm2hSPPcZ9N/V9Af2e7v6/4Ctwd+EPM+PSlq5nZcdJNRH+PAqk/Ao0LuXZQG5ajMKECEY2XXSUen8q8SBiizdPCISNxdpK8+LCvWJisLZD6c1tcVHkwxW9+RyaLbhsU8vAqX/n4EJRKD0DnFSOF5rhw1rtAtiUjYOaxTjYg3UdF+bGL0vJDsxWnoYgSAfQ1AR00lePKu/J4iXuJmjUosztMq//Y44Oz+EsR8d/BKEHrnzjhjpR0xJ0XLdp+Yj5cS0utw0rguIXcS3Uxj1bAfAvnmTuxNln9hfYpYn+yDd6m2IqZlVS9iijfjAE5zH7XD+QYdD8jH8VYR9xxYtfmcoBmwUnbhBZ1zgflIiQa/paZFaxOpE5D3dwvoibL7qaT6i0GEGuln8uQsdJoHm7DBo7w8LdhCMYSDfo9AK9BodqgYvylIyRAKqg5BJBKbZdeKoO39jGV23ruc7g1Z5dj/qm0Ym7eUO3wqh2L/BQ5tB7qrVQZOoHnVMG6AVdHYE/CHSC5QobuLTOY3u3n9aqS8Rc9mDpn0MLkrRlqKM8uIXnL7XqgPR4J3O+aMrgaa x-ms-exchange-antispam-messagedata: +NKeL3LmO+gO5ICcSbVdEER6hv0xG4uGHk9/PD/1idLzkm+hGZZTj/vA9jmE/DyZqAnO5Gdx4I4tAgKrSvQvpBvgbQX2CqXfOuw4OJ+zvJlGynL9W7IAwK5B1E4uIkcgAQXpSDn6dlYeIWHmbKP8/A== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ffdb09a-7ea3-4819-cc1f-08d7b16716e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2020 16:01:01.9322 (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: cF2EsSxkd+6UbYflf8L0J5ouH4wmgWLWJfKs+OM+11vYp3rBQc/4Ito1P8SS26Rt X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0012 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: dri-devel On Behalf Of > Nathan Chancellor > Sent: 2020/February/14, Friday 1:30 AM > To: Wentland, Harry ; Li, Sun peng (Leo) > ; Deucher, Alexander > ; Koenig, Christian > ; Zhou, David(ChunMing) > > Cc: clang-built-linux@googlegroups.com; Nathan Chancellor > ; dri-devel@lists.freedesktop.org; amd- > gfx@lists.freedesktop.org; linux-kernel@vger.kernel.org > Subject: [PATCH] drm/amd/display: Don't take the address of > skip_scdc_overwrite in dc_link_detect_helper >=20 > Clang warns: >=20 > ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:980:36: > warning: address of 'sink->edid_caps.panel_patch.skip_scdc_overwrite' > will always evaluate to 'true' [-Wpointer-bool-conversion] > if (&sink->edid_caps.panel_patch.skip_scdc_overwrite) > ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ > 1 warning generated. >=20 > This is probably not what was intended so remove the address of operator, > which matches how skip_scdc_overwrite is handled in the rest of the drive= r. >=20 > While we're here, drop an extra newline after this if block. >=20 > Fixes: a760fc1bff03 ("drm/amd/display: add monitor patch to disable SCDC > read/write") > Link: > https://github.com/ClangBuiltLinux/linux/issues/879 > Signed-off-by: Nathan Chancellor Thank you! Reviewed-by: Zhan Liu > --- >=20 > As an aside, I don't see skip_scdc_overwrite assigned a value anywhere, i= s > this working as intended? >=20 > drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c > b/drivers/gpu/drm/amd/display/dc/core/dc_link.c > index 24d99849be5e..a3bfa05c545e 100644 > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c > @@ -977,10 +977,9 @@ static bool dc_link_detect_helper(struct dc_link > *link, > if ((prev_sink !=3D NULL) && ((edid_status =3D=3D EDID_THE_SAME) > || (edid_status =3D=3D EDID_OK))) > same_edid =3D is_same_edid(&prev_sink->dc_edid, > &sink->dc_edid); >=20 > - if (&sink->edid_caps.panel_patch.skip_scdc_overwrite) > + if (sink->edid_caps.panel_patch.skip_scdc_overwrite) > link->ctx->dc->debug.hdmi20_disable =3D true; >=20 > - > if (link->connector_signal =3D=3D SIGNAL_TYPE_DISPLAY_PORT > && > sink_caps.transaction_type =3D=3D > DDC_TRANSACTION_TYPE_I2C_OVER_AUX) { > /* > -- > 2.25.0 >=20 > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flists= . > freedesktop.org%2Fmailman%2Flistinfo%2Fdri- > devel&data=3D02%7C01%7Czhan.liu%40amd.com%7Cb0b05e8e1c944b85 > 0cc108d7b12508b4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7 > C637172644928182374&sdata=3DOfX%2BPBPCkFt8Elo12VfVBg6Ecnui7Vh > hZwQFaKy5eyM%3D&reserved=3D0