Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1077915pxb; Wed, 6 Oct 2021 23:43:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVHlZVaiQGQGhElsWXRwJ6YkmMerAdHGuNm7uGTuYt1/wPPlPhUG7KQzongXM3D73Kzard X-Received: by 2002:a17:90a:ba0e:: with SMTP id s14mr3525042pjr.213.1633589034623; Wed, 06 Oct 2021 23:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633589034; cv=none; d=google.com; s=arc-20160816; b=MW6NjEBaW7KQUSNRMkmhl7yUoufC3R7f7SXMDaqSNzRxcPYOwcEzgLDzTIuJj0Zf7H d31umB5fmqAE9RvGSEAGY7mBRwB/pvJhj1IzXZmjN7niGQWyoBEboUfZeEB5h8s8Lgfx FT9Dd5qSJdgBlKwcwVU/9caOkKFMufnNDl+aB/szlkB5wtPMnO8Y3imSvsp2cBerL/VN w15QD8yaot5xgbFHUAoxMFxq9WqevmjGlQvVvsW4/QHvLpOYMf/IgC9z/VrpAbbn3tFC X86FbJfZ1QEv+bjwQRNSgTOvHCYwkWyr7FH5vTYIyq930PBtxqKmwYqYQ7Lo/2UBj1me +J2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=lSPFEV4jButoTElTw5/K8Lz6m5y9sdQDE0xu+Hd4ZCE=; b=o2tSP9jiWi7qFiOwe/J6fzFcG5REmsy24oD1gGUXKClxrcTYTvKCYT3tUWTipLqPXD unuX0GpRUqsEK4UDnDgikCYRwhTStyXdS3bjX4F32SaPMNVkpjoow9iT1tOJ5j1Nf4wz QtGd4i6NmAMtzTJijwRMUTaKbJGoNjycUpUiezZi6UhLlvICzjx5fyUdZ7C9vNg9iO2h YNO4m2UksNz++UiigdZVp7xqEOVfHLuibCPdX7qtMbkhx9OOZFagKCE5naGXzDtHrumg jVTYJUouw+osfrRLwsWD0wjnVVpvgAOEDeJ2eiXPTEIOmbx02F6VMV0NAHSlj/JLflC5 qxew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=eqRCPu9U; 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=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 16si8402680pja.180.2021.10.06.23.43.41; Wed, 06 Oct 2021 23:43:54 -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=@yahoo.ca header.s=s2048 header.b=eqRCPu9U; 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=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232418AbhJGGjI (ORCPT + 99 others); Thu, 7 Oct 2021 02:39:08 -0400 Received: from sonic317-22.consmr.mail.gq1.yahoo.com ([98.137.66.148]:37002 "EHLO sonic317-22.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230491AbhJGGjH (ORCPT ); Thu, 7 Oct 2021 02:39:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1633588632; bh=lSPFEV4jButoTElTw5/K8Lz6m5y9sdQDE0xu+Hd4ZCE=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=eqRCPu9UsCXvr/h44H70ZAywcgenDodPNCy46wFsGaosBO39OyXHiD/7W7rpsqyasJAWUO3Saq9EUuXQ0Ns2j3FFX14vsE11CdNNAW6aHa0vwQQv7DZHzHlM+oK2N1mcnYmrCz38U6G3OcbbUHHAUgolBcJotq0CfBKZpwHSIKcpOEm4K+uPfdI2xXiRwqFLm8xE3TE/CFFba0hHZaMWln3+do5DbpZjaKNCPHSkr3BhcDU6Cu2+48NvmVlOkIjXeHPoOKdbRil9piDMpHALLo/DhmTdeapeGbg72dRNnbk+vTim5pLTk17eaFLFThhhnturAQeFLxscRz7ea/sDkg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1633588632; bh=X9b5tbG0XK0qKfb8I7T1xiU+zpLFi9FEtJGotYy17NM=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=s3eSZqeeQVURyTiRHTSCxNSV4uS3bu0V6P4C6l1Cp7RCTSrPso4sYO7z4K2/1Dcb6xLHYmUJF1PZTAPbLR6FehM1yTXriCTnmZqwci69nsLEATXiRUSR1dpUvzP1g2TLquuW6iBjDNq3xuNr//v+JhsW567BLXelNi5QCPxDpG77SE5nd4g1blOqtw/D2H/Zp5hBPxyczUttcsBhp8hbxT1LnaPWooIMwUwEcePBLlItfps89+0FSE2SGowHHnq9Xaje4M+fmliKNLUKAsX/woTabg0wSvxldtToY3oH59jWMJAWNu75MbQXJ+w5IODOeEze+wmBsBn3rMRvUIbYyQ== X-YMail-OSG: X3Z6AKwVM1kHEaBDKjVnfyogvy2ujoQSWmwy1zvVQ92VWhAxZtGZmPwVGcVg0bf GBufUnRrH_yJ7j9ffSzZHJlRfR_q0ThvCOghYhf.CoBqStQwLdAmL79zoBwFHLyGVf4e2VDzufw8 Zv_mXT6RXGj_baSztJD9d2ikL3ONJz4GxlKvWPewWkCyzogqUgijzXmKS.VusOgt5LyzwnWeJMBi g8MQShGJVSDB8TuD6FwslynHSM7vALRYOk2Oez4KDa7GZkpr9RU_lPosJUDbvXR7W3CCHXOqcuae epFcfYDD0Y4R0MB71daFbASRCWB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o.com with HTTP; Thu, 7 Oct 2021 06:37:12 +0000 Received: by kubenode520.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID fd4e705cbc19264f98ad12010b56fdd1; Thu, 07 Oct 2021 06:37:08 +0000 (UTC) From: "Alex Xu (Hello71)" To: dri-devel@lists.freedesktop.org, Daniel Vetter Cc: ville.syrjala@linux.intel.com, linux-kernel@vger.kernel.org, Simon Ser , "Alex Xu (Hello71)" Subject: [PATCH v3] drm/plane-helper: fix uninitialized variable reference Date: Thu, 7 Oct 2021 02:37:06 -0400 Message-Id: <20211007063706.305984-1-alex_y_xu@yahoo.ca> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: <20211007063706.305984-1-alex_y_xu.ref@yahoo.ca> Content-Length: 1299 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drivers/gpu/drm/drm_plane_helper.c: In function 'drm_primary_helper_update': drivers/gpu/drm/drm_plane_helper.c:113:32: error: 'visible' is used uninitialized [-Werror=uninitialized] 113 | struct drm_plane_state plane_state = { | ^~~~~~~~~~~ drivers/gpu/drm/drm_plane_helper.c:178:14: note: 'visible' was declared here 178 | bool visible; | ^~~~~~~ cc1: all warnings being treated as errors visible is an output, not an input. in practice this use might turn out OK but it's still UB. Fixes: df86af9133 ("drm/plane-helper: Add drm_plane_helper_check_state()") Reviewed-by: Simon Ser Signed-off-by: Alex Xu (Hello71) --- drivers/gpu/drm/drm_plane_helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index 5b2d0ca03705..838b32b70bce 100644 --- a/drivers/gpu/drm/drm_plane_helper.c +++ b/drivers/gpu/drm/drm_plane_helper.c @@ -123,7 +123,6 @@ static int drm_plane_helper_check_update(struct drm_plane *plane, .crtc_w = drm_rect_width(dst), .crtc_h = drm_rect_height(dst), .rotation = rotation, - .visible = *visible, }; struct drm_crtc_state crtc_state = { .crtc = crtc, -- 2.33.0