From: Mark Haverkamp <markh@osdl.org>
To: Peter Chubb <peter@chubb.wattle.id.au>
Cc: Christoph Hellwig <hch@infradead.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] aacraid 2.5
Date: 09 Dec 2002 15:13:11 -0800 [thread overview]
Message-ID: <1039475591.28638.31.camel@markh1.pdx.osdl.net> (raw)
In-Reply-To: <15861.4842.846748.181660@wombat.chubb.wattle.id.au>
On Mon, 2002-12-09 at 14:02, Peter Chubb wrote:
> >>>>> "Mark" == Mark Haverkamp <markh@osdl.org> writes:
>
> Mark> On Fri, 2002-12-06 at 16:30, Christoph Hellwig wrote:
> >> On Fri, Dec 06, 2002 at 07:45:42AM -0800, Mark Haverkamp wrote: >
> >> +/** > + * Convert capacity to cylinders > + * accounting for the
> >> fact capacity could be a 64 bit value > + * > + */ > +static inline
> >> u32 cap_to_cyls(sector_t capacity, u32 divisor) > +{ > +#ifdef
> >> CONFIG_LBD > + do_div(capacity, divisor); > +#else > + capacity /=
> >> divisor; > +#endif > + return (u32) capacity; > +}
> >>
> >> Please use sector_div() instead. It exists for a reason.
>
>
> Mark> Thanks for finding this. I have enclosed a change using your
> Mark> suggestion.
>
>
> sector_div(a, b) is just like do_div(a, b) -- it returns the
> remainder, and sets a to a/b which is not reflected in your patch...
>
oops, I didn't look closely enough at the sector_div code.
--
Mark Haverkamp <markh@osdl.org>
next prev parent reply other threads:[~2002-12-09 23:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <158487460@toto.iv>
2002-12-09 22:02 ` Peter Chubb
2002-12-09 23:13 ` Mark Haverkamp [this message]
2002-12-06 15:45 Mark Haverkamp
2002-12-07 0:30 ` Christoph Hellwig
2002-12-09 18:55 ` Mark Haverkamp
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=1039475591.28638.31.camel@markh1.pdx.osdl.net \
--to=markh@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@chubb.wattle.id.au \
/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®