public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: akpm@linux-foundation.org
Cc: James.Bottomley@HansenPartnership.com,
	linux-scsi@vger.kernel.org, julia@diku.dk
Subject: Re: [patch 15/17] drivers/scsi: Use DIV_ROUND_UP
Date: Mon, 22 Sep 2008 18:43:45 -0600	[thread overview]
Message-ID: <20080923004345.GC27204@parisc-linux.org> (raw)
In-Reply-To: <200809222156.m8MLupx2032307@imap1.linux-foundation.org>

On Mon, Sep 22, 2008 at 02:56:51PM -0700, akpm@linux-foundation.org wrote:
>  
>  		one_clock = esp->ccycle / 1000;
>  		rounded_up = (period << 2);
> -		rounded_up = (rounded_up + one_clock - 1) / one_clock;
> +		rounded_up = DIV_ROUND_UP(rounded_up, one_clock);
>  		stp = rounded_up;
>  		if (stp && esp->rev >= FAS236) {
>  			if (stp >= 50)

Is this not exactly equivalent to:

		one_clock = esp->ccycle / 1000;
		stp = DIV_ROUND_UP(period << 2, one_clock);

(rounded_up is local to this if condition).

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2008-09-23  0:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 21:56 [patch 15/17] drivers/scsi: Use DIV_ROUND_UP akpm
2008-09-23  0:43 ` Matthew Wilcox [this message]
2008-09-24 19:26   ` Julia Lawall
2008-09-24 19:31     ` Matthew Wilcox

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=20080923004345.GC27204@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=julia@diku.dk \
    --cc=linux-scsi@vger.kernel.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