[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHCN7xKtu2y=757_mAmR64vCKCo-g78U-qWYT+j5_Rv5Gc+USQ@mail.gmail.com>
Date: Wed, 19 Feb 2025 05:29:22 -0600
From: Adam Ford <aford173@...il.com>
To: Chongchong Gu <chongchonggu21@...il.com>
Cc: vkoul@...nel.org, kishon@...nel.org, linux-phy@...ts.infradead.org,
linux-kernel@...r.kernel.org, guchongchong <guchongchong@...omi.com>
Subject: Re: [PATCH v3 1/1] phy: freescale: limit div value in FIELD_PREP()
On Wed, Feb 19, 2025 at 4:54 AM Chongchong Gu <chongchonggu21@...il.com> wrote:
>
> From: guchongchong <guchongchong@...omi.com>
>
> In fsl_samsung_hdmi_phy_configure_pll_lock_det, the variable named
> div becomes 4 after loop. It must less than 4 in function named
> FIELD_PREP(REG12_CK_DIV_MASK, div).
>
There has already been a fix applied to linux-next to address this
[1]. Have you tried this to see if it works with your compiler?
adam
[1] - https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/phy/freescale?h=next-20250219&id=cd57e4327707126dca3f9517b84274c001d4c184
> A way to reproduce when run the following shell command
> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4
>
> Fixes: <d567679f2b6a> ("phy: freescale: fsl-samsung-hdmi: Clean up")
> Signed-off-by: guchongchong <guchongchong@...omi.com>
> ---
> drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
> index 45004f598e4d..0ad766359cbe 100644
> --- a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
> +++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
> @@ -337,7 +337,7 @@ fsl_samsung_hdmi_phy_configure_pll_lock_det(struct fsl_samsung_hdmi_phy *phy,
> /* Find int_pllclk speed */
> for (div = 0; div < 4; div++) {
> int_pllclk = pclk / (1 << div);
> - if (int_pllclk < (50 * MHZ))
> + if (int_pllclk < (50 * MHZ) || div == 3)
> break;
> }
>
> --
> 2.48.1
>
Powered by blists - more mailing lists