Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9074851pxu; Mon, 28 Dec 2020 06:04:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwr4VuWvYd6lfGNNspclaIblKPZA3/pBSNW5XKW9SgvDEBSflRzwKtBDDWNcC8FO2HcrS+f X-Received: by 2002:a17:906:9452:: with SMTP id z18mr42286183ejx.389.1609164251519; Mon, 28 Dec 2020 06:04:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164251; cv=none; d=google.com; s=arc-20160816; b=ci4Q+CHvDmWGJgKsg6UsndIcG7JlmCZweF2ZgKBKgLhov8zldqZvyb6zv1+x6zqfHh aq1lnn7BLOCacSGubfcRlYZ6XbRjz9lp3G/oG2WvWbz7lLVCH4MrPO7l26yImAVWGg2X m65Uh60u807fvyGclw1F+mCsfFVtv+pH7yQIrYF7ziqM9iEMse7y/29el3yOk5blEvKw TixLD8vwuPHVfUY1NnnpFbUh2nTverq/MeCcAbYLSTk2npMFomKNBVF7j/mKlZzdSpwz J/G70i/FEp30u28nNPJvyFK9t/UA2KA+0LHx5uJ5COf841jwPocDFv48d2h9YP9FUx6S Ibwg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=d2rfeI634DfxmCt+UV163EchNO+wVh0sM+rFyXWBwuw=; b=eEEvFRZxkhVUjmtBVu55eIYEn32F33AFYh5nQfFUtdX6y+azzEo481HLyGlZxei2Qw L5XlDaxtT280CvzLc226pGkvIRFyMW/d1Ioq+NG8i8kwCCaEGqwUL0gdjWvXLDTTzA/n OcLFgN//4IOONeYNwyy7a542V6ufJPEXEbQpElfa2RqiGavxGgm//N3CNJOj3B7p1m8d Xco4+05gQZ9bPQk/lLhRC+U2JGugLvMwtbAnUrIkHIz1ijWRVApo2RExOW40X+19qTkm iJ1LavcsW3MJ56U25f25tw9EGhXLs/iVTI+EfJi2I+ATBPhlCD8lHePLGeRYfKXj1M9F 1wUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2eTmnw3O; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk23si21856187edb.17.2020.12.28.06.03.48; Mon, 28 Dec 2020 06:04:11 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=2eTmnw3O; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436794AbgL1OCK (ORCPT + 99 others); Mon, 28 Dec 2020 09:02:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:34768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436776AbgL1OCH (ORCPT ); Mon, 28 Dec 2020 09:02:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DAFBE207B2; Mon, 28 Dec 2020 14:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164112; bh=La1nj419sCoKHvl2W+GdP2b1LQK+p7HdGYME50Q9hbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2eTmnw3OSF3dZRGvZXSlyYK1V7QnCYP0u2lYFTElxa5BSvxbPPu2tbcmoL0Y5UrQG 1MQWzRCkNLNgJ/DOs79Lkhvp5uwKhgA9BP3t0Ln2w5isn/kmMUB523ZZ9QYkwVpICd FhuwjIOYW0NQIAtLZtXY9qQRV3U4HFgVDOtOziU0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Ilia Mirkin , Sasha Levin Subject: [PATCH 5.10 064/717] drm/edid: Fix uninitialized variable in drm_cvt_modes() Date: Mon, 28 Dec 2020 13:41:02 +0100 Message-Id: <20201228125024.061845231@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lyude Paul [ Upstream commit 991fcb77f490390bcad89fa67d95763c58cdc04c ] Noticed this when trying to compile with -Wall on a kernel fork. We potentially don't set width here, which causes the compiler to complain about width potentially being uninitialized in drm_cvt_modes(). So, let's fix that. Changes since v1: * Don't emit an error as this code isn't reachable, just mark it as such Changes since v2: * Remove now unused variable Fixes: 3f649ab728cd ("treewide: Remove uninitialized_var() usage") Signed-off-by: Lyude Paul Reviewed-by: Ilia Mirkin Link: https://patchwork.freedesktop.org/patch/msgid/20201105235703.1328115-1-lyude@redhat.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/drm_edid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 631125b46e04c..b84efd538a702 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -3114,6 +3114,8 @@ static int drm_cvt_modes(struct drm_connector *connector, case 0x0c: width = height * 15 / 9; break; + default: + unreachable(); } for (j = 1; j < 5; j++) { -- 2.27.0