diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2024-02-29 15:05:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-05 16:59:28 +0300 |
commit | 4d44ea3a61c20faedc042874489c2758ae5daca0 (patch) | |
tree | e227ee04a969171e0e449636b0ea0e6d1a813a91 /drivers/staging | |
parent | 699b60ba237def5d83c53fbf29be468154ec37a6 (diff) | |
download | linux-4d44ea3a61c20faedc042874489c2758ae5daca0.tar.xz |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/greybus/audio_topology.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c index 08e6a807c132..5dc4721105d4 100644 --- a/drivers/staging/greybus/audio_topology.c +++ b/drivers/staging/greybus/audio_topology.c @@ -761,7 +761,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol, { int ret, wi, ctl_id; unsigned int val, mux, change; - unsigned int mask; struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct gb_audio_ctl_elem_value gbvalue; @@ -802,7 +801,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol, mux = ucontrol->value.enumerated.item[0]; val = mux << e->shift_l; - mask = e->mask << e->shift_l; if (le32_to_cpu(gbvalue.value.enumerated_item[0]) != ucontrol->value.enumerated.item[0]) { @@ -815,7 +813,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol, if (ucontrol->value.enumerated.item[1] > e->items - 1) return -EINVAL; val |= ucontrol->value.enumerated.item[1] << e->shift_r; - mask |= e->mask << e->shift_r; if (le32_to_cpu(gbvalue.value.enumerated_item[1]) != ucontrol->value.enumerated.item[1]) { change = 1; |