* [PATCH] phy: mediatek/mt8195: fx mtk_hdmi_pll_calc() return code
@ 2023-04-14 7:58 Arnd Bergmann
2023-04-18 18:06 ` Matthias Brugger
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-04-14 7:58 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, Chunfeng Yun, Vinod Koul,
Kishon Vijay Abraham I, Matthias Brugger,
AngeloGioacchino Del Regno, Guillaume Ranquet
Cc: Arnd Bergmann, dri-devel, linux-mediatek, linux-arm-kernel,
linux-phy, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The newly added function returns an uninitialized variable:
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c:298:6: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
Wire it up to the return code of the function called just before,
assuming that this was the intention originally.
Fixes: 45810d486bb4 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
index abfc077fb0a8..c8e540665fcb 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
@@ -292,7 +292,7 @@ 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,
+ ret = mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low,
PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv,
txposdiv, digital_div);
if (ret)
--
2.39.2
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phy: mediatek/mt8195: fx mtk_hdmi_pll_calc() return code
2023-04-14 7:58 [PATCH] phy: mediatek/mt8195: fx mtk_hdmi_pll_calc() return code Arnd Bergmann
@ 2023-04-18 18:06 ` Matthias Brugger
0 siblings, 0 replies; 2+ messages in thread
From: Matthias Brugger @ 2023-04-18 18:06 UTC (permalink / raw)
To: Arnd Bergmann, Chun-Kuang Hu, Philipp Zabel, Chunfeng Yun,
Vinod Koul, Kishon Vijay Abraham I, AngeloGioacchino Del Regno,
Guillaume Ranquet
Cc: Arnd Bergmann, dri-devel, linux-mediatek, linux-arm-kernel,
linux-phy, linux-kernel
Hi Arnd,
On 14/04/2023 09:58, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The newly added function returns an uninitialized variable:
>
> drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c:298:6: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
>
> Wire it up to the return code of the function called just before,
> assuming that this was the intention originally.
>
> Fixes: 45810d486bb4 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
> index abfc077fb0a8..c8e540665fcb 100644
> --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
> +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
> @@ -292,7 +292,7 @@ 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,
> + ret = mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low,
> PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv,
> txposdiv, digital_div);
> if (ret)
I think this is the third patch that fixes this :) Your solution look quite
similar to this one:
20230413-fixes-for-mt8195-hdmi-phy-v2-1-bbad62e64321@baylibre.com
Regards,
Mmatthias
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-18 18:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14 7:58 [PATCH] phy: mediatek/mt8195: fx mtk_hdmi_pll_calc() return code Arnd Bergmann
2023-04-18 18:06 ` Matthias Brugger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).