* [PATCH][next] regulator: core: Remove redundant assignment to variable possible_uV
@ 2024-02-16 13:49 Colin Ian King
2024-02-21 0:51 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-02-16 13:49 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown; +Cc: kernel-janitors, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][next] regulator: core: Remove redundant assignment to variable possible_uV
2024-02-16 13:49 [PATCH][next] regulator: core: Remove redundant assignment to variable possible_uV Colin Ian King
@ 2024-02-21 0:51 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-02-21 0:51 UTC (permalink / raw)
To: Liam Girdwood, Colin Ian King; +Cc: kernel-janitors, linux-kernel
On Fri, 16 Feb 2024 13:49:18 +0000, Colin Ian King wrote:
> 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]
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: core: Remove redundant assignment to variable possible_uV
commit: 055100d1a3b27ce154b3e3041d3cef24778821b3
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-21 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-16 13:49 [PATCH][next] regulator: core: Remove redundant assignment to variable possible_uV Colin Ian King
2024-02-21 0:51 ` Mark Brown
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®