From: Colin Ian King <colin.i.king@gmail.com>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] regulator: core: Remove redundant assignment to variable possible_uV
Date: Fri, 16 Feb 2024 13:49:18 +0000 [thread overview]
Message-ID: <20240216134918.2108262-1-colin.i.king@gmail.com> (raw)
The variable possible_uV being assigned a value that is never read, the
control flow via the following goto statement takes a path where the
variable is not accessed. The assignment is redundant and can be removed.
Cleans up clang scan build warning:
drivers/regulator/core.c:3935:3: warning: Value stored to 'possible_uV'
is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/regulator/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index a968dabb48f5..17c98c5fa45f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3932,7 +3932,6 @@ static int regulator_get_optimal_voltage(struct regulator_dev *rdev,
if (ret < 0)
return ret;
- possible_uV = desired_min_uV;
done = true;
goto finish;
--
2.39.2
next reply other threads:[~2024-02-16 13:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 13:49 Colin Ian King [this message]
2024-02-21 0:51 ` Mark Brown
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=20240216134918.2108262-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®