Re: sound/pci/hda/intel_hda: small cleanups

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

 



At Thu, 31 Aug 2006 15:39:29 +0200,
Pavel Machek wrote:
> 
> Hi!
> 
> > > @@ -271,8 +272,8 @@ struct azx_dev {
> > >  	/* for sanity check of position buffer */
> > >  	unsigned int period_intr;
> > >  
> > > -	unsigned int opened: 1;
> > > -	unsigned int running: 1;
> > > +	unsigned int opened :1;
> > > +	unsigned int running :1;
> > >  };
> > >  
> > >  /* CORB/RIRB */
> > > @@ -330,8 +331,8 @@ struct azx {
> > >  
> > >  	/* flags */
> > >  	int position_fix;
> > > -	unsigned int initialized: 1;
> > > -	unsigned int single_cmd: 1;
> > > +	unsigned int initialized :1;
> > > +	unsigned int single_cmd :1;
> > >  };
> > 
> > Any official standard reference for bit-field expressions?
> 
> Well, logically : belongs to the 1, and include/linux understands it
> like that...

OK, "xxx :1;" looks major, too :)

> > >  /* driver types */
> > > @@ -642,14 +643,14 @@ static int azx_reset(struct azx *chip)
> > >  	azx_writeb(chip, GCTL, azx_readb(chip, GCTL) | ICH6_GCTL_RESET);
> > >  
> > >  	count = 50;
> > > -	while (! azx_readb(chip, GCTL) && --count)
> > > +	while (!azx_readb(chip, GCTL) && --count)
> > >  		msleep(1);
> > 
> > Hm, it looks rather like a personal preference.
> > IMHO, it's harder to read without space...
> 
> Well, core parts (sched.c?) use it without the space, and I'd say (!
> expression) is unusual in kernel, but no, could not find it codified.

I don't mind much to change it now, but hopefully people won't be too
strict about this rule...

> > I'll fix the volatile things separately.

The access is really over RAM, not MMIO.  So it should be OK to access
in that way.  But volatile seems superfluous.  I'll get rid of it.

Also, msleep() in the removal should be synchronize_irq().

I'll fix these changes and commit with your space fixes to ALSA tree.


Thanks,


Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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