Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

staging: greybus: Remove redundant variable 'mask'

The variable mask is being assigned and bit-set but it is never
being used apart from this. The variable is redundant and can
be removed.

Cleans up clang scan build warning:
drivers/staging/greybus/audio_topology.c:764:15: warning: variable 'mask'
set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Link: https://lore.kernel.org/r/20240229120541.219429-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Colin Ian King and committed by
Greg Kroah-Hartman
4d44ea3a 699b60ba

-3
-3
drivers/staging/greybus/audio_topology.c
··· 761 761 { 762 762 int ret, wi, ctl_id; 763 763 unsigned int val, mux, change; 764 - unsigned int mask; 765 764 struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); 766 765 struct snd_soc_dapm_widget *widget = wlist->widgets[0]; 767 766 struct gb_audio_ctl_elem_value gbvalue; ··· 801 802 802 803 mux = ucontrol->value.enumerated.item[0]; 803 804 val = mux << e->shift_l; 804 - mask = e->mask << e->shift_l; 805 805 806 806 if (le32_to_cpu(gbvalue.value.enumerated_item[0]) != 807 807 ucontrol->value.enumerated.item[0]) { ··· 813 815 if (ucontrol->value.enumerated.item[1] > e->items - 1) 814 816 return -EINVAL; 815 817 val |= ucontrol->value.enumerated.item[1] << e->shift_r; 816 - mask |= e->mask << e->shift_r; 817 818 if (le32_to_cpu(gbvalue.value.enumerated_item[1]) != 818 819 ucontrol->value.enumerated.item[1]) { 819 820 change = 1;