* [PATCH] ASoC: tlv320aic32x4: pll: Remove impossible condition in clk_aic32x4_pll_determine_rate()
@ 2023-06-13 1:12 Stephen Boyd
2023-06-13 8:24 ` Maxime Ripard
2023-06-13 19:00 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Boyd @ 2023-06-13 1:12 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-kernel, linux-clk, patches, Maxime Ripard, kernel test robot
Smatch warns:
sound/soc/codecs/tlv320aic32x4-clk.c:219 clk_aic32x4_pll_determine_rate() warn: unsigned 'rate' is never less than zero.
Cc: Maxime Ripard <maxime@cerno.tech>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306101217.08CRVGcK-lkp@intel.com/
Fixes: 25d43ec352ea ("ASoC: tlv320aic32x4: pll: Switch to determine_rate")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
sound/soc/codecs/tlv320aic32x4-clk.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic32x4-clk.c b/sound/soc/codecs/tlv320aic32x4-clk.c
index a7ec501b4c69..c116e82f712d 100644
--- a/sound/soc/codecs/tlv320aic32x4-clk.c
+++ b/sound/soc/codecs/tlv320aic32x4-clk.c
@@ -208,18 +208,14 @@ static int clk_aic32x4_pll_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
struct clk_aic32x4_pll_muldiv settings;
- unsigned long rate;
int ret;
ret = clk_aic32x4_pll_calc_muldiv(&settings, req->rate, req->best_parent_rate);
if (ret < 0)
return -EINVAL;
- rate = clk_aic32x4_pll_calc_rate(&settings, req->best_parent_rate);
- if (rate < 0)
- return rate;
+ req->rate = clk_aic32x4_pll_calc_rate(&settings, req->best_parent_rate);
- req->rate = rate;
return 0;
}
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: tlv320aic32x4: pll: Remove impossible condition in clk_aic32x4_pll_determine_rate()
2023-06-13 1:12 [PATCH] ASoC: tlv320aic32x4: pll: Remove impossible condition in clk_aic32x4_pll_determine_rate() Stephen Boyd
@ 2023-06-13 8:24 ` Maxime Ripard
2023-06-13 19:00 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2023-06-13 8:24 UTC (permalink / raw)
To: Stephen Boyd
Cc: Michael Turquette, linux-kernel, linux-clk, patches, kernel test robot
[-- Attachment #1: Type: text/plain, Size: 612 bytes --]
On Mon, Jun 12, 2023 at 06:12:00PM -0700, Stephen Boyd wrote:
> Smatch warns:
>
> sound/soc/codecs/tlv320aic32x4-clk.c:219 clk_aic32x4_pll_determine_rate() warn: unsigned 'rate' is never less than zero.
>
> Cc: Maxime Ripard <maxime@cerno.tech>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202306101217.08CRVGcK-lkp@intel.com/
> Fixes: 25d43ec352ea ("ASoC: tlv320aic32x4: pll: Switch to determine_rate")
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Thanks for taking care of this
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: tlv320aic32x4: pll: Remove impossible condition in clk_aic32x4_pll_determine_rate()
2023-06-13 1:12 [PATCH] ASoC: tlv320aic32x4: pll: Remove impossible condition in clk_aic32x4_pll_determine_rate() Stephen Boyd
2023-06-13 8:24 ` Maxime Ripard
@ 2023-06-13 19:00 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2023-06-13 19:00 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-kernel, linux-clk, patches, Maxime Ripard, kernel test robot
Quoting Stephen Boyd (2023-06-12 18:12:00)
> Smatch warns:
>
> sound/soc/codecs/tlv320aic32x4-clk.c:219 clk_aic32x4_pll_determine_rate() warn: unsigned 'rate' is never less than zero.
>
> Cc: Maxime Ripard <maxime@cerno.tech>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202306101217.08CRVGcK-lkp@intel.com/
> Fixes: 25d43ec352ea ("ASoC: tlv320aic32x4: pll: Switch to determine_rate")
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-13 19:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13 1:12 [PATCH] ASoC: tlv320aic32x4: pll: Remove impossible condition in clk_aic32x4_pll_determine_rate() Stephen Boyd
2023-06-13 8:24 ` Maxime Ripard
2023-06-13 19:00 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).