Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267765AbTGLGhd (ORCPT ); Sat, 12 Jul 2003 02:37:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267768AbTGLGhd (ORCPT ); Sat, 12 Jul 2003 02:37:33 -0400 Received: from phoenix.infradead.org ([195.224.96.167]:59396 "EHLO phoenix.infradead.org") by vger.kernel.org with ESMTP id S267765AbTGLGhc (ORCPT ); Sat, 12 Jul 2003 02:37:32 -0400 Date: Sat, 12 Jul 2003 07:52:02 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Bernardo Innocenti , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: do_div vs sector_t Message-ID: <20030712075202.A1327@infradead.org> Mail-Followup-To: Christoph Hellwig , Matthew Wilcox , Bernardo Innocenti , Andrew Morton , linux-kernel@vger.kernel.org References: <20030711223359.GP20424@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030711223359.GP20424@parcelfarce.linux.theplanet.co.uk>; from willy@debian.org on Fri, Jul 11, 2003 at 11:33:59PM +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 642 Lines: 15 On Fri, Jul 11, 2003 at 11:33:59PM +0100, Matthew Wilcox wrote: > aic->seek_mean = aic->seek_total + 128; > do_div(aic->seek_mean, aic->seek_samples); > } > > seek_mean is a sector_t so sometimes it's 64-bit on a 32-bit platform. > so we can't avoid calling do_div(). That's why we have sector_div, never use do_div on a sector_t. - 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/