Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1396266ybv; Thu, 13 Feb 2020 22:32:31 -0800 (PST) X-Google-Smtp-Source: APXvYqxXHo6OlHf6dAhRXn6qfJiGp6Af1LHEMXM1zJ0kfWt8XjK9zQfx3k6nIyMPmJCdYrWZcKsg X-Received: by 2002:a05:6830:1296:: with SMTP id z22mr1024091otp.354.1581661950955; Thu, 13 Feb 2020 22:32:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581661950; cv=none; d=google.com; s=arc-20160816; b=A8J5Qe/XQKsk6JpRbXMDoxLgT1kymefTbu/IetQoPBig/syeXXduoRurNrO58ybYOr aY77qW+x4hNWwwEJtJ0UVHhAj0suiiMyc5dlpoBqpXID2fyxnNdjqxGgustwqV9SM2zv 38NTVmYugJQGruJKlQJPso9dvPYhwC7tmWHnWZaQpzewZNcQDrXSBu08DMG4Gguvt9oT bJjefvX2KCQFYsJEWSXvvj1JYORBx1sVRwvOpTheCXo3yr6/F4iG7YVBU9eYr/dlhm6O cDQBbA0Q02Tke756P0RYCJhIXF0eazhLC8wbJzSB6jYPc6TkbKC3HFzYjZVm0qLZ+ss9 N/Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ntwhmb838HNdG68VgBkMbYUyn9XVt7puNK0dtc2mxiU=; b=xBYE799AKT7hIiMWRonOWY4shddouPPFVTUnlVyGkAaRU0mhL8m5+NyBA/Pu2rDUUK AasCrBymLr5nKxS3eL2H2YbowUTh+pO+/4z4lMiF+FJn2NUq7eY3CzYlO+Y+PD3HUKCN GvwB47c2sHTViFnRyIEvjwlST1il1fZOd55AprcZhO/0RqZ9UA6mDtpOYhHAdGIWdO8Y y8xYyLPe/msIO2g+QTjHjPaq4Oyu31f1+EVamELNuxG5PnnMCd8u7vEnisELWEr4YqY+ smzjvrQ3aCbggcnCxiRiGddCZ09G+/mftcI7OeWewELEg5tOl5R8YOk2PhiOeVYWLMWY 8LWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Bl2+RkZv; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 107si2369542oth.14.2020.02.13.22.32.19; Thu, 13 Feb 2020 22:32:30 -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=@gmail.com header.s=20161025 header.b=Bl2+RkZv; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728741AbgBNGah (ORCPT + 99 others); Fri, 14 Feb 2020 01:30:37 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:41530 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbgBNGah (ORCPT ); Fri, 14 Feb 2020 01:30:37 -0500 Received: by mail-oi1-f193.google.com with SMTP id i1so8414259oie.8 for ; Thu, 13 Feb 2020 22:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ntwhmb838HNdG68VgBkMbYUyn9XVt7puNK0dtc2mxiU=; b=Bl2+RkZv0uKfnpwqzGIIxsKeThJkZXZ76VITQy9giZ6bgEBu0UV9/krz+5ZD7iRrHd /CoK51Nxbh2tquNgg0zTxh2q1hdt3NNU7A/fxgt8EcnYN3MPsTw1HLaPjRxZ7NC16/FH IDjt5ByQBiqH3d3tI9HIvlQHf2iQNmUwvG0Wk8JOFBczVwsx7iM6LVAmrWDQH8YZFhTG y5I6hGBQwm4WwgQzD6yX85fJO/Es1hEEyQerjlTe40XRO8x4FCsh7VrcBiV9ktIloURp MBv8JOvEoD2D+GMtAhl2GSfaWZlJEmc/+Hz1W1zXy6xkyYs/nzU+bRMp6yT/aoN2Luxz QWxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ntwhmb838HNdG68VgBkMbYUyn9XVt7puNK0dtc2mxiU=; b=Ro33QpPbPHT6jDB1GQCslVLpJL+QcZedd6mQlVCBFv27PvisqYYWhu/Sv9Ne8tFG6n W2f5gCA25ttzGXEd5ybS9XCpzAaynFtHMLYQcYQouc1S6CThfSGeCyfS+hjNf81ZmodB LuC985nDglYscacztijChr/EMeGcdUHoGR20ktrDSz7UaNPScjA4qVlHegY8WAFMh7uk fyiqlE/cLuQdgVflJQpHZAK1yWvIm7MKsSs1NZS1wS1f/XYy/e4+JTlp2yX2qwb7gOnt DZUlOU+vLxD3a1NSVHMpElAM0jvSGDFtvjUt2NG6R6O7NpUdpYUKPoWcV7YNhutTfwTG 6ciA== X-Gm-Message-State: APjAAAUDgvR7dBKhr5L2xXhUizPZY1I0suh3i/8rXfWFtDGe7/jsZh59 qcGKJF4uZKeENybK7mBfyfk= X-Received: by 2002:aca:6542:: with SMTP id j2mr873096oiw.69.1581661836582; Thu, 13 Feb 2020 22:30:36 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id c123sm1483599oib.34.2020.02.13.22.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 22:30:36 -0800 (PST) From: Nathan Chancellor To: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] drm/amd/display: Don't take the address of skip_scdc_overwrite in dc_link_detect_helper Date: Thu, 13 Feb 2020 23:29:51 -0700 Message-Id: <20200214062950.14151-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns: ../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. 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 driver. While we're here, drop an extra newline after this if block. 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 --- As an aside, I don't see skip_scdc_overwrite assigned a value anywhere, is this working as intended? drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 != NULL) && ((edid_status == EDID_THE_SAME) || (edid_status == EDID_OK))) same_edid = is_same_edid(&prev_sink->dc_edid, &sink->dc_edid); - if (&sink->edid_caps.panel_patch.skip_scdc_overwrite) + if (sink->edid_caps.panel_patch.skip_scdc_overwrite) link->ctx->dc->debug.hdmi20_disable = true; - if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT && sink_caps.transaction_type == DDC_TRANSACTION_TYPE_I2C_OVER_AUX) { /* -- 2.25.0