From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: Re: RFC: vaddr_t and vsize_t Date: Thu, 18 Jan 2007 08:13:01 +0100 Message-ID: <200701180813.01870.Christoph.Egger@amd.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org On Wednesday 17 January 2007 17:51, Keir Fraser wrote: > On 17/1/07 16:21, "Christoph Egger" wrote: > > This stuff is about removing a place where programmers can make mistakes. > > vaddr_t also avoids void * arithmetics. It should be possible then to use > > -Wpointer-arith. > > A bunch of our void* arithmetic comes from files we keep in sync with > Linux. So we'd really need Linux to clean this up before we use > -Wpointer-arith, or we have to do extra porting effort to keep files in > sync. Well, actually I'm talking about the Xen-kernel and not about the Linux-kernel. > I suppose I don't mind vaddr_t being defined and people using it if they > want to. At least it is probably clearer that translation to/from char* or > long to do pointer arithmetic. However, I'm less sure about a wholesale > conversion of Xen away from use of 'unsigned long'. Ok. I will prepare a patch. Someone has to make the start. :-)