Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 9 Dec 2002 18:04:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 9 Dec 2002 18:04:56 -0500 Received: from air-2.osdl.org ([65.172.181.6]:22728 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id ; Mon, 9 Dec 2002 18:04:55 -0500 Subject: Re: [PATCH] aacraid 2.5 From: Mark Haverkamp To: Peter Chubb Cc: Christoph Hellwig , Alan Cox , linux-kernel In-Reply-To: <15861.4842.846748.181660@wombat.chubb.wattle.id.au> References: <15861.4842.846748.181660@wombat.chubb.wattle.id.au> Content-Type: text/plain Organization: Message-Id: <1039475591.28638.31.camel@markh1.pdx.osdl.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 09 Dec 2002 15:13:11 -0800 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1231 Lines: 31 On Mon, 2002-12-09 at 14:02, Peter Chubb wrote: > >>>>> "Mark" == Mark Haverkamp 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/