Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp100099pxb; Wed, 8 Sep 2021 18:40:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWHeCQRrsZTIJkPINrtt50YJV68+GIABsq6lGWFl4tTAsK/D5MD1HEvSzfYRWdp5QeAU5S X-Received: by 2002:a05:6e02:1141:: with SMTP id o1mr339090ill.279.1631151632588; Wed, 08 Sep 2021 18:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631151632; cv=none; d=google.com; s=arc-20160816; b=Bh9j80tAd6VORuTfJyg48iuhoMfcW2uP2fEyCmbQlZwShUVzwil2l+6tWL+luknFBF KjUdw9XxT1Xx7ExdBlxB7zgZ+2mfNMuuo8gT2NJ026FqcYRQ8MiwL+/Qads01xuF7duw OvegLiBpIi3s9F4nPEtAFFCRFxTCbYgL7Lz1gPiqal/DU/P98+iMGRRbbQLPIyCqmAYV iR/C3KU42lOvZGHqgLxKqK1pHLTJL0Px7QLVd6dmlQblHYcvCMLAnf2AQVeOMFqjsTkX iLUepVXih/ozPTeAFm32yJas8XxX6XtOl0GgNnw2ONc9t+ZtG4sKwjnFtorZvVzDeQoC SOFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C08fKdke0xrmWj9slXAe3LXit3kTtXHi+OOJDsIMfBg=; b=Yz8DoyLNc7RX5PLl+q7Wh9f3W6rHovIfIvYFIKiRLLPVbw/oFqn96qEbBxYWpAlz83 Iilr54cGfTez1WKZJcifE3+WzQgOataRwNjn0MNCz1o5YOE/xyzSP4NZLCICN5E0wNqY opuF7FztvnYCd4WOAa+JrncIvbfnbuBwDhFTWMLQRmckw1ge1CHtFyr9RQNGeFqGeM3r QrBUJYx5OQ1CPKeROiPB/2EW540OVkL5upPiArvoItzO4w50r1fIRc1u06GYAsXnYa1l /9IS4jeRNI6A+r6+PDcNVixIF17vExpOR4Tn9nZUb+TBZK+gzzl/DEYYdGJ2zxEThXuH SdoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=EerTMdTv; 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 186si240268jaf.38.2021.09.08.18.40.20; Wed, 08 Sep 2021 18:40:32 -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=EerTMdTv; 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 S243930AbhIIBeL (ORCPT + 99 others); Wed, 8 Sep 2021 21:34:11 -0400 Received: from sonic314-20.consmr.mail.gq1.yahoo.com ([98.137.69.83]:41896 "EHLO sonic314-20.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236691AbhIIBeK (ORCPT ); Wed, 8 Sep 2021 21:34:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1631151182; bh=C08fKdke0xrmWj9slXAe3LXit3kTtXHi+OOJDsIMfBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=EerTMdTv3N1isWugNxqUGhTSHQN/kyfZ18zQTnYN1AQSDO8Mb34chzV1DMY6KpKkkEoRSeJ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yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Thu, 9 Sep 2021 01:33:02 +0000 Received: by kubenode528.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 2ef029e8b92ceadaa8a8ceb4103cbf32; Thu, 09 Sep 2021 01:32:56 +0000 (UTC) From: "Alex Xu (Hello71)" To: dri-devel@lists.freedesktop.org Cc: ville.syrjala@linux.intel.com, linux-kernel@vger.kernel.org, "Alex Xu (Hello71)" Subject: [PATCH v2] drm/plane-helper: fix uninitialized variable reference Date: Wed, 8 Sep 2021 21:32:47 -0400 Message-Id: <20210909013247.32743-1-alex_y_xu@yahoo.ca> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Length: 1254 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()") 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