public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	Phil Carmody <ext-phil.2.carmody@nokia.com>,
	Ambresh K <ambresh@ti.com>, Benoit Cousson <b-cousson@ti.com>,
	Eduardo Valentin <eduardo.valentin@nokia.com>,
	Sanjeev Premi <premi@ti.com>, Tero Kristo <tero.kristo@nokia.com>,
	Thara Gopinath <thara@ti.com>
Subject: Re: [PM-WIP-OPP][PATCH 2/2] omap: pm: opp: twl: use DIV_ROUND_UP
Date: Tue, 20 Apr 2010 16:42:58 -0700	[thread overview]
Message-ID: <878w8hbshp.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1271792994-31816-3-git-send-email-nm@ti.com> (Nishanth Menon's message of "Tue\, 20 Apr 2010 14\:49\:54 -0500")

Nishanth Menon <nm@ti.com> writes:

> From: Phil Carmody <ext-phil.2.carmody@nokia.com>
>
> kernel.h provides a function for DIV_ROUND_UP which should be used
> instead of replicating it in code.
>
> Cc: Ambresh K <ambresh@ti.com>
> Cc: Benoit Cousson <b-cousson@ti.com>
> Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Sanjeev Premi <premi@ti.com>
> Cc: Tero Kristo <tero.kristo@nokia.com>
> Cc: Thara Gopinath <thara@ti.com>
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>

Nice.  Applied to pm-wip-opp.

Kevin

> ---
>  arch/arm/plat-omap/opp_twl_tps.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/plat-omap/opp_twl_tps.c b/arch/arm/plat-omap/opp_twl_tps.c
> index 468fb97..112f106 100644
> --- a/arch/arm/plat-omap/opp_twl_tps.c
> +++ b/arch/arm/plat-omap/opp_twl_tps.c
> @@ -37,5 +37,5 @@ unsigned long omap_twl_vsel_to_uv(const u8 vsel)
>  u8 omap_twl_uv_to_vsel(unsigned long uv)
>  {
>  	/* Round up to higher voltage */
> -	return (((uv + 99) / 100 - 6000) + 124) / 125;
> +	return DIV_ROUND_UP(uv - 600000, 12500);
>  }
> -- 
> 1.6.3.3

  reply	other threads:[~2010-04-20 23:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 19:49 [PM-WIP-OPP][PATCH 0/2 v2] opp layer cleanups Nishanth Menon
2010-04-20 19:49 ` [PM-WIP-OPP][PATCH 1/2 v2] omap3: pm: cpufreq: BUG_ON cleanup Nishanth Menon
2010-04-20 19:49   ` [PM-WIP-OPP][PATCH 2/2] omap: pm: opp: twl: use DIV_ROUND_UP Nishanth Menon
2010-04-20 23:42     ` Kevin Hilman [this message]
2010-04-20 23:41   ` [PM-WIP-OPP][PATCH 1/2 v2] omap3: pm: cpufreq: BUG_ON cleanup Kevin Hilman
2010-04-20 23:48     ` Nishanth Menon

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=878w8hbshp.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=ambresh@ti.com \
    --cc=b-cousson@ti.com \
    --cc=eduardo.valentin@nokia.com \
    --cc=ext-phil.2.carmody@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=premi@ti.com \
    --cc=tero.kristo@nokia.com \
    --cc=thara@ti.com \
    /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