* [PATCH] clk/tegra/clk-tegra124-dfll-fcpu: Add check to 'regulator_list_voltage'
@ 2023-03-14 13:17 Alfredo Cruz
2023-03-15 0:43 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Alfredo Cruz @ 2023-03-14 13:17 UTC (permalink / raw)
To: mturquette, pdeschrijver, pgaikwad, linux-clk, linux-tegra; +Cc: Alfredo Cruz
Signed-off-by: Alfredo Cruz <alfredo.carlon@gmail.com>
---
Hi,
I'm not entirely sure if 'regulator_list_voltage(reg, 0)' will never return less than 0.
drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
index 5e339ad0a97c..745bb828e53e 100644
--- a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
+++ b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
@@ -543,6 +543,8 @@ static int get_alignment_from_regulator(struct device *dev,
return PTR_ERR(reg);
align->offset_uv = regulator_list_voltage(reg, 0);
+ if (align->offset_uv < 0)
+ align->offset_uv = 0;
align->step_uv = regulator_get_linear_step(reg);
regulator_put(reg);
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk/tegra/clk-tegra124-dfll-fcpu: Add check to 'regulator_list_voltage'
2023-03-14 13:17 [PATCH] clk/tegra/clk-tegra124-dfll-fcpu: Add check to 'regulator_list_voltage' Alfredo Cruz
@ 2023-03-15 0:43 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2023-03-15 0:43 UTC (permalink / raw)
To: Alfredo Cruz, linux-clk, linux-tegra, mturquette, pdeschrijver,
pgaikwad
Cc: Alfredo Cruz
Quoting Alfredo Cruz (2023-03-14 06:17:18)
> Signed-off-by: Alfredo Cruz <alfredo.carlon@gmail.com>
Sorry, we can't apply this. It needs commit text. Please see
Documentation/process/submitting-patches.rst
> ---
> Hi,
> I'm not entirely sure if 'regulator_list_voltage(reg, 0)' will never return less than 0.
Please find out.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-15 0:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 13:17 [PATCH] clk/tegra/clk-tegra124-dfll-fcpu: Add check to 'regulator_list_voltage' Alfredo Cruz
2023-03-15 0:43 ` Stephen Boyd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.