Re: [PATCH] Clean up ASOC functions to support 32b values instead of 16b

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

 



On 7/23/08, Timur Tabi <timur@xxxxxxxxxxxxx> wrote:
> On Wed, Jul 23, 2008 at 6:36 PM, Jon Smirl <jonsmirl@xxxxxxxxx> 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@xxxxxxxxx
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/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