[PATCH] ALSA: led: Use restricted type for iface assignment

Jaroslav Kysela perex at perex.cz
Tue Nov 23 18:06:07 CET 2021


On 23. 11. 21 18:02, Takashi Iwai wrote:
> Fix a sparse warning that complains about the inconsistent type
> assignment for iface, which is a restricted type of
> snd_ctl_elem_iface_t.
> 
> Fixes: a135dfb5de15 ("ALSA: led control - add sysfs kcontrol LED marking layer")
> Reported-by: kernel test robot <lkp at intel.com>
> Link: https://lore.kernel.org/r/202111201028.xduVYgH5-lkp@intel.com
> Signed-off-by: Takashi Iwai <tiwai at suse.de>

Reviwed-by: Jaroslav Kysela <perex at perex.cz>

Thanks,
	Jaroslav

> ---
>   sound/core/control_led.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/core/control_led.c b/sound/core/control_led.c
> index a95332b2b90b..207828f30983 100644
> --- a/sound/core/control_led.c
> +++ b/sound/core/control_led.c
> @@ -509,7 +509,7 @@ static char *parse_string(char *s, char *val, size_t val_size)
>   	return s;
>   }
>   
> -static char *parse_iface(char *s, unsigned int *val)
> +static char *parse_iface(char *s, snd_ctl_elem_iface_t *val)
>   {
>   	if (!strncasecmp(s, "card", 4))
>   		*val = SNDRV_CTL_ELEM_IFACE_CARD;
> 


-- 
Jaroslav Kysela <perex at perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list