ALSA: led: Use restricted type for iface assignment
PATCH 1/1 ALSA: led: Use restricted type for iface assignment
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 <[email protected]>
Signed-off-by Takashi Iwai <[email protected]>
--- sound/core/control_led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/control_led.c +1 -1
@@ -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 ;
Signature · 1 line
2.31.1
Jaroslav Kysela
maintainerQuoted 8 lines · Takashi Iwai
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 <[email protected]>Signed-off-by Takashi Iwai <[email protected]>
Reviwed-by Jaroslav Kysela <[email protected]>
Thanks,
Jaroslav
Quoted 18 lines
--- sound/core/control_led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/core/control_led.c +1
-1@@ -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 ;
Signature · 2 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.