mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Amit Kucheria <amit.kucheria@canonical.com>
Cc: List Linux Kernel <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de,
	valentin.longchamp@epfl.ch, daniel@caiaq.de,
	grant.likely@secretlab.ca, Dinh.Nguyen@freescale.com,
	r.herring@freescale.com, bryan.wu@canonical.com
Subject: Re: [PATCHv2 05/11] mxc: Core support for i.MX5 series of processors from Freescale
Date: Wed, 3 Feb 2010 09:24:53 +0000	[thread overview]
Message-ID: <20100203092453.GA21921@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <f10f79e7313ecdeeb59ab881795baedf2430c636.1265173480.git.amit.kucheria@canonical.com>

On Tue, Feb 02, 2010 at 09:16:27PM -0800, Amit Kucheria wrote:
> +static int _clk_pll_set_rate(struct clk *clk, unsigned long rate)
> +{
> +	u32 reg;
> +	void __iomem *pllbase;
> +
> +	long mfi, pdf, mfn, mfd = 999999;
> +	s64 temp64;
> +	unsigned long quad_parent_rate;
> +	unsigned long pll_hfsm, dp_ctl;
> +	unsigned long parent_rate;
> +
> +	parent_rate = clk_get_rate(clk->parent);
> +
> +	pllbase = _get_pll_base(clk);
> +
> +	quad_parent_rate = 4 * parent_rate;
> +	pdf = mfi = -1;
> +	while (++pdf < 16 && mfi < 5)
> +		mfi = rate * (pdf+1) / quad_parent_rate;
> +	if (mfi > 15)
> +		return -1;

Why not "return -EPERM" since what you're actually saying here by
returning -1 is "Permission Denied"?  If you didn't mean "Permission
Denied", then don't use return -1.

  parent reply	other threads:[~2010-02-03  9:25 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03  5:16 [PATCHv2 00/11] Base support for Freescale i.MX51 SoC platform Amit Kucheria
     [not found] ` <cover.1265173480.git.amit.kucheria@canonical.com>
2010-02-03  5:16   ` [PATCHv2 01/11] arm: mxc: TrustZone interrupt controller (TZIC) for i.MX5 family Amit Kucheria
2010-02-03  6:23     ` Eric Miao
2010-02-03  9:45       ` Sascha Hauer
2010-02-03 13:24       ` Amit Kucheria
2010-02-03 15:09         ` Eric Miao
2010-02-04  0:54           ` Eric Miao
2010-02-04 17:09         ` Nguyen Dinh-R00091
2010-02-03  5:16   ` [PATCHv2 02/11] mxc timer: refactor timer code to use timer versions Amit Kucheria
2010-02-03 16:23     ` Grant Likely
2010-02-03  5:16   ` [PATCHv2 03/11] mxc: Fix Drive Strength Field in the IOMUX controller Amit Kucheria
2010-02-03  6:29     ` Eric Miao
2010-02-03  9:40       ` Sascha Hauer
2010-02-03 16:27     ` Grant Likely
2010-02-04  0:25       ` Amit Kucheria
2010-02-03  5:16   ` [PATCHv2 04/11] mxc: changes to common plat-mxc code to add support for i.MX5 Amit Kucheria
2010-02-03  6:43     ` Eric Miao
2010-02-03  9:49       ` Sascha Hauer
2010-02-03 13:38         ` Amit Kucheria
2010-02-03 15:16           ` Eric Miao
2010-02-03 16:35     ` Grant Likely
2010-02-03  5:16   ` [PATCHv2 05/11] mxc: Core support for i.MX5 series of processors from Freescale Amit Kucheria
2010-02-03  7:03     ` Eric Miao
2010-02-03 14:20       ` Amit Kucheria
2010-02-03  9:24     ` Russell King - ARM Linux [this message]
2010-02-03 11:04     ` Sascha Hauer
2010-02-03 20:07       ` Amit Kucheria
2010-02-03 16:08     ` Rabin Vincent
2010-02-03  5:16   ` [PATCHv2 06/11] mxc: enable support for Freescale i.MX5 series of processors Amit Kucheria
2010-02-03  5:16   ` [PATCHv2 07/11] mxc: Add support for the Babbage board Amit Kucheria
2010-02-03 11:10     ` Sascha Hauer
2010-02-03  5:16   ` [PATCHv2 08/11] fec: fix uninitialized rx buffer usage Amit Kucheria
2010-02-03 16:46     ` Grant Likely
2010-02-03 18:33       ` Amit Kucheria
2010-02-03 18:38         ` Grant Likely
2010-02-03 20:23           ` Grant Likely
2010-02-03  5:16   ` [PATCHv2 09/11] fec: Add LAN8700 phy support Amit Kucheria
2010-02-03  5:16   ` [PATCHv2 10/11] fec: Add ARCH_MX5 as a dependency Amit Kucheria
2010-02-03  5:16   ` [PATCHv2 11/11] mxc: Add imx51_defconfig Amit Kucheria
2010-02-05  6:48     ` Sascha Hauer

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=20100203092453.GA21921@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=Dinh.Nguyen@freescale.com \
    --cc=amit.kucheria@canonical.com \
    --cc=bryan.wu@canonical.com \
    --cc=daniel@caiaq.de \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=r.herring@freescale.com \
    --cc=s.hauer@pengutronix.de \
    --cc=valentin.longchamp@epfl.ch \
    /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

all inboxes | Powered by JetHome®