From: pure.logic@nexus-software.ie (Bryan O'Donoghue)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 04/34] clk: omap2: change omap2_round_to_table_rate return logic
Date: Mon, 1 Jan 2018 19:07:31 +0000 [thread overview]
Message-ID: <1514833681-30737-5-git-send-email-pure.logic@nexus-software.ie> (raw)
In-Reply-To: <1514833681-30737-1-git-send-email-pure.logic@nexus-software.ie>
This patch updates the round_rate() logic here to return zero instead of a
negative number on error.
In conjunction with higher-level changes associated with acting on the
return value of clk_ops->round_rate() it is then possible to have
clk_ops->round_rate() return values from 1 Hz to ULONG_MAX Hz instead of
the current limitation of 1 Hz to LONG_MAX Hz.
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk at vger.kernel.org
Cc: linux-omap at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
---
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
index e024600..ce3a33f 100644
--- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
+++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
@@ -75,9 +75,9 @@ unsigned long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *parent_rate)
{
const struct prcm_config *ptr;
- long highest_rate;
+ unsigned long highest_rate;
- highest_rate = -EINVAL;
+ highest_rate = 0;
for (ptr = rate_table; ptr->mpu_speed; ptr++) {
if (!(ptr->flags & cpu_mask))
--
2.7.4
next prev parent reply other threads:[~2018-01-01 19:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1514833681-30737-1-git-send-email-pure.logic@nexus-software.ie>
2018-01-01 19:07 ` [PATCH v2 01/34] clk_ops: change round_rate() to return unsigned long Bryan O'Donoghue
2018-01-01 19:07 ` Bryan O'Donoghue [this message]
2018-01-01 19:07 ` [PATCH v2 08/34] clk: bcm2835: change bcm2835_pll_rate_from_divisors " Bryan O'Donoghue
2018-01-01 19:07 ` [PATCH v2 10/34] clk: bcm: iproc: change iproc_asiu_clk_round_rate() return logic Bryan O'Donoghue
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=1514833681-30737-5-git-send-email-pure.logic@nexus-software.ie \
--to=pure.logic@nexus-software.ie \
--cc=linux-arm-kernel@lists.infradead.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