[alsa-devel] [PATCH] Clean up ASOC functions to support 32b values instead of 16b
Jon Smirl
jonsmirl at gmail.com
Thu Jul 24 04:08:33 CEST 2008
On 7/23/08, Timur Tabi <timur at freescale.com> wrote:
> On Wed, Jul 23, 2008 at 6:36 PM, Jon Smirl <jonsmirl at gmail.com> wrote:
>
> > +int snd_soc_update_bits(struct snd_soc_codec *codec, uint reg,
> > + uint mask, uint value);
> > +int snd_soc_test_bits(struct snd_soc_codec *codec, uint reg,
> > + uint mask, uint value);
>
>
> Please use "unsigned int" instead of "uint".
Why? uint is a standard Linux kernel definition. I almost made them all u32.
>
>
> > - short reg_cache_size;
>
> > - short reg_cache_step;
> > + uint reg_cache_size;
> > + uint reg_cache_step;
>
>
> size_t?
>
>
> > struct soc_enum {
> > - unsigned short reg;
> > - unsigned short reg2;
> > - unsigned char shift_l;
> > - unsigned char shift_r;
> > - unsigned int max;
> > + uint reg;
> > + uint reg2;
> > + uint shift_l;
> > + uint shift_r;
> > + uint max;
>
>
> In this case, 'max' was already the right size. You're now mixing the
> real types with abbreviated ones, and so it's inconsistent.
>
>
> --
> Timur Tabi
> Linux kernel developer at Freescale
>
--
Jon Smirl
jonsmirl at gmail.com
More information about the Alsa-devel
mailing list