public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: ludovic.desroches@atmel.com
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	plagnioj@jcrosoft.com, nicolas.ferre@atmel.com
Subject: Re: [PATCH 1/3] mmc: atmel-mci: correct data timeout computation
Date: Wed, 21 Mar 2012 19:26:04 +0300	[thread overview]
Message-ID: <4F6A011C.3000900@mvista.com> (raw)
In-Reply-To: <1332344483-3915-2-git-send-email-ludovic.desroches@atmel.com>

Hello.

On 03/21/2012 06:41 PM, ludovic.desroches@atmel.com wrote:

> From: Ludovic Desroches<ludovic.desroches@atmel.com>

> The HSMCI operates at a rate of up to Master Clock divided by two.

> Signed-off-by: Ludovic Desroches<ludovic.desroches@atmel.com>
> ---
>   drivers/mmc/host/atmel-mci.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)

> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index e4449a5..e161452 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -480,7 +480,7 @@ err:
>   static inline unsigned int atmci_ns_to_clocks(struct atmel_mci *host,
>   					unsigned int ns)
>   {
> -	return (ns * (host->bus_hz / 1000000) + 999) / 1000;
> +	return (ns * ((host->bus_hz/2) / 1000000) + 999) / 1000;

    Why don't you keep the notation by addign spaces around '/'?
    BTW, could use DIV_ROUND_UP() here.

WBR, Sergei

  reply	other threads:[~2012-03-21 15:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 15:41 [PATCH 0/3] atmel-mci fixes ludovic.desroches
2012-03-21 15:41 ` [PATCH 1/3] mmc: atmel-mci: correct data timeout computation ludovic.desroches
2012-03-21 16:26   ` Sergei Shtylyov [this message]
2012-03-22  8:57     ` Ludovic Desroches
2012-03-28 10:28   ` [PATCH v2 " ludovic.desroches
2012-03-28 11:44     ` Nicolas Ferre
2012-04-01  3:43       ` Chris Ball
2012-03-21 15:41 ` [PATCH 2/3] mmc: atmel-mci: r/w proof capability only available since v2xx ludovic.desroches
2012-03-22 14:44   ` Nicolas Ferre
2012-04-01  3:43     ` Chris Ball
2012-03-21 15:41 ` [PATCH 3/3] mmc: atmel-mci: add support for odd clock dividers ludovic.desroches
2012-03-22 14:48   ` Nicolas Ferre
2012-04-01  3:44     ` Chris Ball
2012-04-02  6:52       ` Ludovic Desroches

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=4F6A011C.3000900@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.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