Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2840669rwr; Fri, 21 Apr 2023 15:18:58 -0700 (PDT) X-Google-Smtp-Source: AKy350ZKOiUo2iWj4yVh2HGpjj60nozgOx88BDwqer0U9rc74dI5iv8zmVH4QxKLxuwzKz0EkTWT X-Received: by 2002:a17:902:e852:b0:1a9:4b42:a5a2 with SMTP id t18-20020a170902e85200b001a94b42a5a2mr3610982plg.0.1682115537929; Fri, 21 Apr 2023 15:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682115537; cv=none; d=google.com; s=arc-20160816; b=rqqIJv59GD8cHIR87XhFEQKDBYFnWeSYWfeBwi/xo9BImc7BwSJw9jVkPtzEV1iQ1q 33h2EAODTL14VrKlDN17yfPS8Ma0NiePm+Wg07DEknxQS78gWj268VqaHjpU7vXr+Vz5 mmh12PBkqpBVbQOSbS5pGElzE3qxf483D0ytB+acXO4GsM75hAml+IMXxJKJ8nFyHasg 1mQDzsrcZ1csoFp0pCOmlPUCmfv6h/6Z0N0A5+wjg7E2xWx3ZUUCvO68iZruXte7SiY9 YlqR+hD28T3fByyFtuo5BG24A5YQHbFI4Z2lshDQuZdhOWg85YxouI5FfPEIf4mEQU7h 1xfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zB9CO1O3ZiOZCJyEl0GBNbAHGnBbw66wtWbZnKs10ds=; b=KXrQM2ve5UGaPGYx2/IkLkbXIDPAl3cPjFm+ATD3QGMTTvORir4ouj+SX4bNG3kk2u 689BXlgcUFFBN42JxZ3mS/XXK+fPEunGr0YgVbPeRrJL+hXB0nNvV2O6voOGcaR+FjY5 UK+255mufNsFfWm+gp6OKJqZ3cn4UpTdG5rYSPBqY7HJOdt5SFKIjm2x+f8Hw084ewod SjGH/739Yp7EFhr20lm7JYlIvzZcX1rp7fQwwKIoR17DBm2ZVkwG7tmdvYh7to/ZEL95 7MpMtiY2UIWIKRGBwB50megc7PmhZHb17pEwCfUaOrqEPHpO+EQUezKiZOuqqK+0sGNE tu5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mTwMl+eJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a10-20020a1709027e4a00b001a4ebe5d058si5263065pln.38.2023.04.21.15.18.46; Fri, 21 Apr 2023 15:18:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mTwMl+eJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233840AbjDUWOC (ORCPT + 99 others); Fri, 21 Apr 2023 18:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233734AbjDUWNm (ORCPT ); Fri, 21 Apr 2023 18:13:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CD4330E3 for ; Fri, 21 Apr 2023 15:13:34 -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 1A4F164B99 for ; Fri, 21 Apr 2023 22:13:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB865C4339B; Fri, 21 Apr 2023 22:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682115213; bh=XZd3xOHh9hRBu/JySb+r9z3kK1JjV1tv32skF1cGDD4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mTwMl+eJzSMy03iFAPAUp2luKiUzmKPxD1vHfIkFe4Op2MvFaumks9ziuyiKumi0v Kb/A8ohF449C24/uFul9iePPNOmLn95Zm4ndeWMsNRXj/rv9p/xW25pi4mfS/fVaTf VFwB+RLND2DfSaBonTlBPJP1WiV8fiFmWzg4E84lUoQJzQ9GA+ndAvfyfCj0W1FnD4 m3EuUHMyJy4e15fVTJUwSxUh7WEUDFlfghF/VUXYforrGmxivzem48PrTb9o3XkUWl qaF8VAirH/9KOwHFiHeOTm+Yga6UiorhrHPbmTSc+hc2glWjs/f1Eg5f/NB/e4vYra wWAJqLWNq8X6g== Date: Fri, 21 Apr 2023 15:13:30 -0700 From: Nathan Chancellor To: Guillaume Ranquet Cc: Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Matthias Brugger , AngeloGioacchino Del Regno , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot , llvm@lists.linux.dev Subject: Re: [PATCH v2 1/2] phy: mediatek: hdmi: mt8195: fix uninitialized variable usage in pll_calc Message-ID: <20230421221330.GA3657732@dev-arch.thelio-3990X> References: <20230413-fixes-for-mt8195-hdmi-phy-v2-0-bbad62e64321@baylibre.com> <20230413-fixes-for-mt8195-hdmi-phy-v2-1-bbad62e64321@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230413-fixes-for-mt8195-hdmi-phy-v2-1-bbad62e64321@baylibre.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Fri, Apr 14, 2023 at 06:07:46PM +0200, Guillaume Ranquet wrote: > The ret variable in mtk_hdmi_pll_calc() was used unitialized as reported > by the kernel test robot. > > Fix the issue by removing the variable altogether and testing out the > return value of mtk_hdmi_pll_set_hw() > > Fixes: 45810d486bb44 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195") > Reported-by: kernel test robot > Signed-off-by: Guillaume Ranquet Reviewed-by: Nathan Chancellor Can somebody pick this up? It fixes a rather obvious warning, which is breaking clang builds (as evidenced by three versions of the same fix). > --- > drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c > index abfc077fb0a8..054b73cb31ee 100644 > --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c > +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c > @@ -213,7 +213,7 @@ static int mtk_hdmi_pll_calc(struct mtk_hdmi_phy *hdmi_phy, struct clk_hw *hw, > u64 tmds_clk, pixel_clk, da_hdmitx21_ref_ck, ns_hdmipll_ck, pcw; > u8 txpredivs[4] = { 2, 4, 6, 12 }; > u32 fbkdiv_low; > - int i, ret; > + int i; > > pixel_clk = rate; > tmds_clk = pixel_clk; > @@ -292,13 +292,9 @@ static int mtk_hdmi_pll_calc(struct mtk_hdmi_phy *hdmi_phy, struct clk_hw *hw, > if (!(digital_div <= 32 && digital_div >= 1)) > return -EINVAL; > > - mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low, > + return mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low, > PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv, > txposdiv, digital_div); > - if (ret) > - return -EINVAL; > - > - return 0; > } > > static int mtk_hdmi_pll_drv_setting(struct clk_hw *hw) > > -- > 2.40.0 >