Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262468AbVAEPgF (ORCPT ); Wed, 5 Jan 2005 10:36:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262469AbVAEPdS (ORCPT ); Wed, 5 Jan 2005 10:33:18 -0500 Received: from one.firstfloor.org ([213.235.205.2]:43961 "EHLO one.firstfloor.org") by vger.kernel.org with ESMTP id S262468AbVAEPRr (ORCPT ); Wed, 5 Jan 2005 10:17:47 -0500 To: linux-os@analogic.com Cc: linux-kernel@vger.kernel.org Subject: Re: remap_pfm_range() Linux-2.6.10 References: From: Andi Kleen Date: Wed, 05 Jan 2005 16:17:46 +0100 In-Reply-To: (linux-os@chaos.analogic.com's message of "Wed, 5 Jan 2005 10:00:24 -0500 (EST)") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 707 Lines: 16 linux-os writes: > remap_pfn_range(vma, vma->vm_start, base_addr >> PAGE_SHIFT, len, prot) > > Now, here's the $US0.02 question. Why wasn't PAGE_SHIFT put inside > the new function? The base address cannot ever be used without > PAGE_SHIFT. In previous versions, information hiding was properly Because such a conversion would be very error prone. People would likely add subtle bugs. Changing units is always dangerous. -Andi - 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/