Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 04, 2006 at 06:26:24PM +0200, Takashi Iwai wrote:
> At Wed, 04 Oct 2006 17:23:14 +0100,
> James Courtier-Dutton wrote:
> > 
> > Takashi Iwai wrote:
> > > -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
> > > -	outl(emu->port + HCFG, emu->saved_hcfg);
> > > +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
> > > +	outl(emu->saved_hcfg, emu->port + HCFG);
> > >   
> > Is there any tool to find out who got this wrong in the first place?
> 
> One could check whether the argument is long or not.  The long is
> likely an i/o port while the data is int or unsigned int.
> But, C allows implicit conversion, so the compiler would never
> complain...

Using sparse should help in avoiding this kind of bug.

-- 
Ville Syrjälä
syrjala@xxxxxx
http://www.sci.fi/~syrjala/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux