Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1691617pxb; Wed, 9 Feb 2022 02:18:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJoMhomp+K2GqI8hEVuJIqDFo7x4zZupcZt0KkUo1NWpPZEN44e+nQdht8uMbdkz1Gzg2X X-Received: by 2002:a17:90a:ea94:: with SMTP id h20mr2587683pjz.199.1644401939662; Wed, 09 Feb 2022 02:18:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644401939; cv=none; d=google.com; s=arc-20160816; b=mljtpof0WVQz2KdFwIkx6Msjt/y0mAe+r00SMZRghb9e+YxA9noTDOwrwLeQnVHQhe U/uvH5TeZC4A+indyusSYnGrz2dZxY7GOhz741oItImLiDZPdl6wsg0TpkFi3/8Zh2C3 W9c1lQYkg/cMMWmms8Fj1Eu2zrE0Djut4CSaorZVM1H1Z50kFreaZ0Ne3LZLh1b5Ipp5 n54L3mc/SWLpHFtjW6cuDsDR/PLQdCb+Nad7vEPSPSCglC4SOnp5xtX1yJ0JTaDytkdZ OSDi9ZTd4QFkJebN140syTevs/bYwYDdgRBWaMpepjFr01Kj38D3+1s6gOlAis9CVyAU ngBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=v3Nw6M+6Dsi+fs1JPP1dSSIm9lpFQHB7g75gslpbKeY=; b=n9kEdJvaSjvbGwnClYQ1cbnMivrRArDMBmozstHaP0eKGAUlCgooHol9lROBfNGjKG u9CCKLmigkR5fA2vpkCmI7g+Ip6qIJXYT3BVcmu3mCX/TeD4t/XnyeIlZFt7xu+nbnaP sU/PSmh2hJLWGyEwyeQlo+RHHOueaad4kuDkQ6R80iHnXSxrgCgpqdcO4iYyuWLe9ffu 16YMX3jUzzNXZGLWVnwMnEi0UEZq8g+SkmeLnhKFgT7WLL3DHcdDktj/N+fXCaeY/H8Z 3nhdaxtX6/h9zGvkonhkb6pvySSg2/fBQUT5gDl+FArhtLzsF2xBFhUGWFyCnJU3BU4Z HigQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Mgq5P9NB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b11si14825421pgl.135.2022.02.09.02.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 02:18:59 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Mgq5P9NB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5925DE091EC0; Wed, 9 Feb 2022 01:17:53 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352722AbiBHJBZ (ORCPT + 99 others); Tue, 8 Feb 2022 04:01:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241271AbiBHJBY (ORCPT ); Tue, 8 Feb 2022 04:01:24 -0500 X-Greylist: delayed 503 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 08 Feb 2022 01:01:22 PST Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F07F5C03FEC0 for ; Tue, 8 Feb 2022 01:01:22 -0800 (PST) Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 2187FPYI029207; Tue, 8 Feb 2022 09:52:35 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=v3Nw6M+6Dsi+fs1JPP1dSSIm9lpFQHB7g75gslpbKeY=; b=Mgq5P9NB3nwoHZdVJ6tMjysBImyErUzr19msvPqqz/FQ5su4diuk4I96fqnfOhnwlDhv lB7cKCACz3Sc6atiQ8xnt6n52YdWoAJh2M+QrQqiCwt9NoCNku+bZwbyjSulSmTUWgxR i1KICRpFL5346yegj5hlh6oEk9gNN2NWdxRAETo4tqc+QUE0ejJARTpaCkMkNGlgqGNM 49v0iGD21x+9DC1dQ9KuskABfbYRzmuWZUmR37xtkwCz4/u/9P0VldiHLtEXU/htZ3Q1 WnZ4MJliElInn3GE4UIJge/z8id89T9piEoLjrMVCEJkxSREAs1fUx/VSKF7cXwDFMT+ xQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3e3kyhgmje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Feb 2022 09:52:35 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B7C1A10002A; Tue, 8 Feb 2022 09:52:33 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A885E211F3D; Tue, 8 Feb 2022 09:52:33 +0100 (CET) Received: from [10.129.7.145] (10.75.127.51) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 8 Feb 2022 09:52:33 +0100 Message-ID: <4f666fe5-080e-6c82-5bef-c0b52cb57207@foss.st.com> Date: Tue, 8 Feb 2022 09:52:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] drm/stm: Avoid using val uninitialized in ltdc_set_ycbcr_config() Content-Language: en-US To: Nathan Chancellor , Yannick Fertre , Philippe Cornu , Benjamin Gaignard CC: , Nick Desaulniers , , , , References: <20220207165304.1046867-1-nathan@kernel.org> From: Raphael Gallais-Pou In-Reply-To: <20220207165304.1046867-1-nathan@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-08_02,2022-02-07_02,2021-12-02_01 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Nathan, On 2/7/22 17:53, Nathan Chancellor wrote: > Clang warns: > > drivers/gpu/drm/stm/ltdc.c:625:2: warning: variable 'val' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] > default: > ^~~~~~~ > drivers/gpu/drm/stm/ltdc.c:635:2: note: uninitialized use occurs here > val |= LxPCR_YCEN; > ^~~ > drivers/gpu/drm/stm/ltdc.c:600:9: note: initialize the variable 'val' to silence this warning > u32 val; > ^ > = 0 > 1 warning generated. > > Use a return instead of break in the default case to fix the warning. > Add an error message so that this return is not silent, which could hide > issues in the future. > > Fixes: 484e72d3146b ("drm/stm: ltdc: add support of ycbcr pixel formats") > Link: https://github.com/ClangBuiltLinux/linux/issues/1575 > Signed-off-by: Nathan Chancellor > --- > drivers/gpu/drm/stm/ltdc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Raphael Gallais-Pou Thanks, Raphaƫl