From: Takashi Iwai Subject: Re: [PXA2XX] make pxa2xx audio driver sparse clean Date: Wed, 26 Oct 2005 16:43:59 +0200 Message-ID: References: <1130335228.5700.13.camel@icampbell-debian> <1130337543.5700.42.camel@icampbell-debian> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mx1.suse.de (mail.suse.de [195.135.220.2]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id 5ABCA18D for ; Wed, 26 Oct 2005 16:43:59 +0200 (MEST) In-Reply-To: <1130337543.5700.42.camel@icampbell-debian> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Ian Campbell Cc: Nicolas Pitre , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 26 Oct 2005 15:39:03 +0100, Ian Campbell wrote: > > On Wed, 2005-10-26 at 16:08 +0200, Takashi Iwai wrote: > > At Wed, 26 Oct 2005 15:00:27 +0100, > > Ian Campbell wrote: > > > > > > Hi, > > > > > > Sparse complains because the PXA255 registers are defined as volatile > > > unsigned long * (through the __REGS macro in > > > include/asm-arm/arch-pxa/hardware.h) and the variable being assigned to > > > a u32 (and hence an unsigned int). > > > > Hmm, is unsigned long a really correct type? > > u32 looks correct to me... > > Interesting question. Other than SA1100 most other ARM subarches which > have a __REG macro do use u32. The change below causes some > "initialization from incompatible pointer type" type warnings on my > platform and on lubbock/mainstone but nothing which looks important, my > platform continues to work. > > (I guess if this discussion goes any further we should redirect to the > linux-arm-kernel list...) Yes, arm list is defintely a better place to ask. Takashi > > Ian. > > Index: 2.6/include/asm-arm/arch-pxa/hardware.h > =================================================================== > --- 2.6.orig/include/asm-arm/arch-pxa/hardware.h 2005-10-20 10:32:59.000000000 +0100 > +++ 2.6/include/asm-arm/arch-pxa/hardware.h 2005-10-26 15:20:01.000000000 +0100 > @@ -44,12 +44,12 @@ > > #ifndef __ASSEMBLY__ > > -# define __REG(x) (*((volatile unsigned long *)io_p2v(x))) > +# define __REG(x) (*((volatile u32 *)io_p2v(x))) > > /* With indexed regs we don't want to feed the index through io_p2v() > especially if it is a variable, otherwise horrible code will result. */ > # define __REG2(x,y) \ > - (*(volatile unsigned long *)((unsigned long)&__REG(x) + (y))) > + (*(volatile u32 *)((u32)&__REG(x) + (y))) > > # define __PREG(x) (io_v2p((u32)&(x))) > > > > > -- > Ian Campbell, Senior Design Engineer > Web: http://www.arcom.com > Arcom, Clifton Road, Direct: +44 (0)1223 403 465 > Cambridge CB1 7EA, United Kingdom Phone: +44 (0)1223 411 200 > > > _____________________________________________________________________ > The message in this transmission is sent in confidence for the attention of the addressee only and should not be disclosed to any other party. Unauthorised recipients are requested to preserve this confidentiality. Please advise the sender if the addressee is not resident at the receiving end. Email to and from Arcom is automatically monitored for operational and lawful business reasons. > > This message has been virus scanned by MessageLabs. > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information