From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2D43C77B7A for ; Wed, 7 Jun 2023 20:56:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235523AbjFGU4e (ORCPT ); Wed, 7 Jun 2023 16:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235579AbjFGU4b (ORCPT ); Wed, 7 Jun 2023 16:56:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A3E1721 for ; Wed, 7 Jun 2023 13:56:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9EB906484C for ; Wed, 7 Jun 2023 20:56:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2D9DC433D2; Wed, 7 Jun 2023 20:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1686171385; bh=Mcz5EktUwHLg0suZU3REpBB0SpTgb+SwjpLQnI/u118=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3cbwqw07BpgdjCtwXaSd/uUp8hvXo+FJCRtjE3Z+STKwgDmO3kwOHxjJH1UKZBV1 xHEx8hqbLolBinncrVvQePq8jf8i9R47sBg9qFQphGCsAES+7JOT53Hd0fZTb7GYzF hRDNxfxEErr5ShIVqVoV5KWjl2tAzIzsAIXhqzxg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lyude Paul , Ilia Mirkin Subject: [PATCH 5.4 97/99] drm/edid: Fix uninitialized variable in drm_cvt_modes() Date: Wed, 7 Jun 2023 22:17:29 +0200 Message-ID: <20230607200903.289571140@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230607200900.195572674@linuxfoundation.org> References: <20230607200900.195572674@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Lyude Paul commit 991fcb77f490390bcad89fa67d95763c58cdc04c upstream. 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: Greg Kroah-Hartman --- drivers/gpu/drm/drm_edid.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -2791,6 +2791,8 @@ static int drm_cvt_modes(struct drm_conn case 0x0c: width = height * 15 / 9; break; + default: + unreachable(); } for (j = 1; j < 5; j++) {