Re: [PATCH] clk: actions: owl-pll: cast delay to unsigned long for uelay()

From: Brian Masney

Date: Fri Sep 11 2026 - 20:02:46 EST


Hi Rosen,

The subject has a typo: s/uelay/udelay/

On Fri, Sep 04, 2026 at 02:50:13PM -0700, Rosen Penev wrote:
> The 'delay' field in struct owl_pll_hw is u8, but udelay() internally
> compares its argument against MAX_UDELAY_MS * 1000 (2000). Since a u8
> can never exceed 255, the compiler warns of a tautological comparison
> that is always false:
>
> drivers/clk/actions/owl-pll.c:189:2: error: result of comparison of
> constant 2000 with expression of type 'u8' is always false
>
> Cast the delay value to unsigned long to widen the type and silence the
> warning without changing behavior.

Just to clarify: This only shows up with a W=1 build, right? If so, it
would be good to clarify that in the commit message.

>
> Assisted-by: opencode:big-pickle

The new guidance is:

Assisted-by: LLM

Brian