From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] clk: k3: pll: initialize success flag in ti_pll_wait_for_lock
Date: Mon, 31 Aug 2026 16:44:18 +0200 [thread overview]
Message-ID: <20260831144434.1032533-1-a.fatoum@pengutronix.de> (raw)
When built with clang, we run into following warning (turned error with
CONFIG_WERROR):
drivers/clk/k3/pll.c:100:14: error: variable 'success' is used uninitialized
whenever 'for' loop exits because its condition is false [-Werror,-Wsometimes-uninitialized]
Initialize the variable to fix.
Fixes: 657d39593b2f ("clk: add K3 clk driver")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/clk/k3/pll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/k3/pll.c b/drivers/clk/k3/pll.c
index c76a91b1d094..ef59da3d9dbc 100644
--- a/drivers/clk/k3/pll.c
+++ b/drivers/clk/k3/pll.c
@@ -95,7 +95,7 @@ static int ti_pll_wait_for_lock(struct ti_pll_clk *pll)
int i;
u32 pllfm;
u32 pll_type;
- int success;
+ int success = 0;
for (i = 0; i < 100000; i++) {
stat = readl(pll->reg + PLL_16FFT_STAT);
--
2.47.3
next reply other threads:[~2026-08-31 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 14:44 Ahmad Fatoum [this message]
2026-08-31 14:44 ` [PATCH 2/2] ARM: i.MX9: initialize max_speed in imx9_cpu_speed_grade_hz Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260831144434.1032533-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox