From: Stephen Boyd <sboyd@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
patches@lists.linux.dev,
Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>,
Maxime Ripard <maxime@cerno.tech>
Subject: Re: [PATCH] clk: sprd: composite: Simplify determine_rate implementation
Date: Wed, 14 Jun 2023 12:43:32 -0700 [thread overview]
Message-ID: <cca711ac7af8208949df09b811a13c81.sboyd@kernel.org> (raw)
In-Reply-To: <20230613195443.1555132-1-sboyd@kernel.org>
Quoting Stephen Boyd (2023-06-13 12:54:42)
> The sprd_div_helper_round_rate() function calls divider_round_rate()
> which calls divider_round_rate_parent() which calls
> divider_determine_rate(). This call chain converts back and forth from
> the rate request structure to make a determine_rate clk_op fit with a
> round_rate clk_op. Simplify the code here by directly calling
> divider_determine_rate() instead.
>
> This fixes a smatch warning where an unsigned long is compared to less
> than zero, which is impossible. This makes sprd_div_helper_round_rate()
> unnecessary as well so simply remove it and fold it into the only caller
> left.
>
> Reported-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> Closes: https://lore.kernel.org/r/45fdc54e-7ab6-edd6-d55a-473485608473@oracle.com
> Cc: Maxime Ripard <maxime@cerno.tech>
> Fixes: 302d2f836d78 ("clk: sprd: composite: Switch to determine_rate")
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> ---
Applied to clk-next
prev parent reply other threads:[~2023-06-14 19:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 19:54 [PATCH] clk: sprd: composite: Simplify determine_rate implementation Stephen Boyd
2023-06-14 8:20 ` Maxime Ripard
2023-06-14 19:43 ` Stephen Boyd [this message]
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=cca711ac7af8208949df09b811a13c81.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=mturquette@baylibre.com \
--cc=patches@lists.linux.dev \
/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