[alsa-devel] [PATCH] Clean up ASOC functions to support 32b values instead of 16b

Timur Tabi timur at freescale.com
Thu Jul 24 03:41:39 CEST 2008


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".


> -       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


More information about the Alsa-devel mailing list