Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3766441pxb; Tue, 7 Sep 2021 07:10:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqe/y596yEUg7k/vU8vZV36nXSOaF3lp7r6ZgF2z2RicjtEaLkRMxLTvbA+ZncB38GGpWT X-Received: by 2002:a17:907:d86:: with SMTP id go6mr19788980ejc.475.1631023836904; Tue, 07 Sep 2021 07:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631023836; cv=none; d=google.com; s=arc-20160816; b=Jn1e6u2rmI7ii82nPTzMqhSfqniRuQ18coKjy5x5k5RvtcqufDrxkFpb/7VCaT7hZJ Lb3KUHQq1TbTV7lVYykq0pjb9RCq/vD1xmulXHiA2B1lPXRyicVtI6Ryl4gkU/FestNI 2f/W4Qt/+aJCut1AOGBQagwgaS/Owjig+8fI+FRU5wTuxFKggHO5s/bu6HQuuRs+HQlN bgJCdhHOlT9zQneNJjHBHJXOt1kF7P/K3/oTGMHPGkUurn2h8zvRughosCH2Kpli8zi3 z6xJiwpoWT225ykdPDYh4jX5ZeDT2tnysAb2u9QZGlbiyIKXzf3y8fS2XKli09WVoPLz 0H2w== 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=Z9zQx6waEf/ujPUYmr8rGd6yJIYG33Wc+DNBT4U1n50=; b=RbWUghXXk014xaszYQtJ+bB7fb5jiqvHgCtBpZOmfbU8I66FJg1kAbdc9hG7gqVQFm dqa/1l4kEl5IY2ip0GRjmW0BA5F1XZ4ggv+OOTnBiV3oKsrrqOxIfq/pqssGD/p2k+ep 4VeBj43XL6cqHtUyt+fDt84jzBFrO0JgETRKYaZA1xsghhqFzlPhBACyQrZ8WOJGWXDq XNi/b1GdW1XmYR9F5MK94lcOzJAG4XeWJLxdfJjaogFB+f6DTHWBJtEHqXMObqPHum0f 0vMrnY7zIYd5D0xWnPhSp+MCc479gO30wfLm/W5EbG5DZeIB2F4cWgkPqtHQ7dlUSd2r iFww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=lD8uqCmE; 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 m26si12303578ejn.618.2021.09.07.07.10.09; Tue, 07 Sep 2021 07:10:36 -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=lD8uqCmE; 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 S234261AbhIGOJt (ORCPT + 99 others); Tue, 7 Sep 2021 10:09:49 -0400 Received: from sonic302-21.consmr.mail.gq1.yahoo.com ([98.137.68.147]:35571 "EHLO sonic302-21.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231431AbhIGOJs (ORCPT ); Tue, 7 Sep 2021 10:09:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1631023722; bh=Z9zQx6waEf/ujPUYmr8rGd6yJIYG33Wc+DNBT4U1n50=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=lD8uqCmEMqGzcplZo882RPFQeNJsCTWOG9ffeNgnlv4oDpIreqkA3PrrmTDI29wlI301rpP1B0HuGUfGzyjyCaOiocMW1py+lOJdtv1cM9l3R10AjK2tDMSkLovmDKaemLRw2aA2HVx1ve3vhu9dIYOkl43OHKu4paBoCkqdm7b2x0MHBBirtZYZJ0+ZveFR1Zi399Cf5lt/AFPijrUKDp0OLcjdpBG46sXJfQZXRE8n3h1cOJFMlwWpr9IMbWXqWHyZDuzMCcX6O/tdBJ/aH8cwHxgFmeWPtXoC9msqvJD1mfOXuoIl1DmOrsxXMCrkNv2CvNsiVALY1+AqOqH7Iw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1631023722; bh=fpd42H7duosmZRXSpKbiIFlCLvyfCo9cWQFzfVN3Tqo=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=HFg4KRpjJ3yf/ecxBKwmp6DeTgH/2PcsMnZG2TQsGaQ2TYeKG/me4mwEwI68DmnThvHPYzZYIyxuSKbVd5kB6/iUmVvPBLxnzznDB9AlyGWJ0d9QpXu0pLJoVVZ35Uqofrty87Ctds29pyXcM5GNRvJN7StVqqGUHBPoQYV5wX/xS7TXB+0LzCe7AkNCRT3JDLNqKDwBWhqcN5jtuw2+JtC+HAT5YHPiLuhgvrbPot48EF8PEcchdN4X3bvWV+n1xNWclBFveMIWc21fcRLMmy5Wq63cStIQt++6PPR9dNGMP0o/RPua9HImJBqyFTn3tDqwnFD6xz4Xx3pUxPcoRg== X-YMail-OSG: WnasCEoVM1l67jJwpfyVUjsg3YQyuBB64YEnUn029KiyVF0bhbuVtRErTb6Gf1X im2NOHCXYmHXa9T5Kk6jka9Eo7edX2U6wvcsyejPN88z1E7hRnld_jYmsYMfuZMAOJRhVgFtt_Ir rOKiisFWdsuwsBTqu43AEbHN5jUxOi0ac3N1e0QZoeazZKhFROb7e1_BUFezeEmqE2gcvKxAITgJ bvQySPUkLj3k1XlBfW5RdronfAV_2_5zEiMzwluvTLWmzeplTGbJqD5vmBKr806IssmvSIUYAyUg N9zhH9raKOVn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th1bR7ddHTls1SCGgCBwo131hdVB9axGkjzBS9Q6h pwWeu86toMygt2mycTjQCv.ta_ajQqT0pGQ48eAr_blKEX7kMLDZSS04N8LFhK8vRngl7AHdmI1y ZKxZBswAi6m_P9GFwttUp7TmwBcf8NVcMrtNXfMvnvpSruJ.mJMckcbSYEhtprSG3bFySLlhau98 7eDjFLQvaxT5ooA2eEgE1ffetGh3PEogsoAxrX_3EIZ5qw77OIH4cp5WNtuOfA3Z0.PnPjL9DuJG bhyKR8uOoSp.GGDQdGZcm8il_q8ToTTinaXOFAZUMSukR6BpAMUQ2pGfhoGRGWIllF3cOFvfCIJG wgULz_ksy.daLR.QvOlohpdwMf5NvAQ7Qpb.3CXCwtNngHQe3qlxmBrZldyOxeKdoYG1cauqz56D zQs.nwV3cdxWcMD7P9Ut.8JNHCJUbjSTizW9UuFgP0cUYazBZGm4yaFBcyjjrIj8uTUKvWWhbON_ IhIfCKbXaXURyFgFB.IEk1FUR9CVE49D2qCZX3qvxhQU6J95lac.f5YTb_BdoFEo7gffMTEjjqKh .36j0LQujOniFL3sTNDQkBYyw2byrFZNlDXDJNVfh1fq0RJ9pnS_c5s_dszXNOJmSSdgnZPv2WUQ hEKfgDTZ1qANl6rQ6YKrKDnpq7aRqfHWkbssNgPGKpOpiSw8UfQXNfFEzUUnsHTaKmfJOv6hyEXS d2E.gXwmpJmCgr_dsn160p6350VCpB_u8WwM8TTxOmS1sJAClUxjArMQDzQOFz.hDfibs_UBXQKY TU3rgPYFo3kqOP8c91HLGW2cmPsNAUwzrZpoZ3w_rZVWgC2jFBzGLSvoJC0j41IGSS4DXV0fcr4t OiINOuovEYR4GhRf3jGby5OP_hzMgYcrtUbfr5O34V1X_F1YUWv_L8i8z3XLfE8eik7h2BsaEMie MePEfWO_V7JqYzt9pugR2H2suAf5S0rA3Un8TnnAzDwA- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Tue, 7 Sep 2021 14:08:42 +0000 Received: by kubenode510.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b517298d82bc14160bf5b508c63db16f; Tue, 07 Sep 2021 14:08:38 +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] drm/plane-helper: fix uninitialized variable reference Date: Tue, 7 Sep 2021 10:08:36 -0400 Message-Id: <20210907140836.323149-1-alex_y_xu@yahoo.ca> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: <20210907140836.323149-1-alex_y_xu.ref@yahoo.ca> Content-Length: 1200 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()") --- 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