summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2026-09-11 17:05:27 -0700
committerBrian Masney <bmasney@redhat.com>2026-09-17 11:23:30 -0400
commite9e54518246f84aa07a12930a9f3d6f5b060eca2 (patch)
tree70f8ac8f4c35cb4de05868fcf0e7e3182ab69a32
parent4457ee2f99f7286d037ccde8c107481b6105fc15 (diff)
downloadlinux-next-e9e54518246f84aa07a12930a9f3d6f5b060eca2.tar.gz
linux-next-e9e54518246f84aa07a12930a9f3d6f5b060eca2.zip
clk: actions: owl-pll: cast delay to unsigned long for udelay()
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 W=1 warning without changing behavior. Assisted-by: LLM Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
-rw-r--r--drivers/clk/actions/owl-pll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/actions/owl-pll.c b/drivers/clk/actions/owl-pll.c
index 869690b79cc1..5e30ce35f2f5 100644
--- a/drivers/clk/actions/owl-pll.c
+++ b/drivers/clk/actions/owl-pll.c
@@ -186,7 +186,7 @@ static int owl_pll_set_rate(struct clk_hw *hw, unsigned long rate,
regmap_write(common->regmap, pll_hw->reg, reg);
- udelay(pll_hw->delay);
+ udelay((unsigned long)pll_hw->delay);
return 0;
}