summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.sr@gmail.com>2020-07-09 13:27:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 17:43:26 +0300
commitdbc676e722db28ab8cfb6cc857ac49d8808a5be4 (patch)
treef49b595ddde9d13b7b3b260f67c073ebf420329d /drivers/staging
parentc9a57eddb235d53b0a8b9d740e454ef466086fc8 (diff)
downloadlinux-dbc676e722db28ab8cfb6cc857ac49d8808a5be4.tar.xz
drivers: staging: audio: Fix the missing header file for helper file
This patch fixes the warning reported for missing prototypes due to missing header file. Also, it includes changes to remove unused_but_set_variables. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Link: https://lore.kernel.org/r/6341df9b0b5985047af0bbbc8e136481ac515b25.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/greybus/audio_helper.c1
-rw-r--r--drivers/staging/greybus/audio_topology.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/greybus/audio_helper.c b/drivers/staging/greybus/audio_helper.c
index faaa39708118..8b100a71f02e 100644
--- a/drivers/staging/greybus/audio_helper.c
+++ b/drivers/staging/greybus/audio_helper.c
@@ -7,6 +7,7 @@
#include <sound/core.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
+#include "audio_helper.h"
#define gbaudio_dapm_for_each_direction(dir) \
for ((dir) = SND_SOC_DAPM_DIR_IN; (dir) <= SND_SOC_DAPM_DIR_OUT; \
diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
index ad88d3127a60..2f9fdbdcd547 100644
--- a/drivers/staging/greybus/audio_topology.c
+++ b/drivers/staging/greybus/audio_topology.c
@@ -28,14 +28,16 @@ static struct gbaudio_module_info *find_gb_module(
struct gbaudio_codec_info *codec,
char const *name)
{
- int dev_id, ret;
+ int dev_id;
char begin[NAME_SIZE];
struct gbaudio_module_info *module;
if (!name)
return NULL;
- ret = sscanf(name, "%s %d", begin, &dev_id);
+ if (sscanf(name, "%s %d", begin, &dev_id) != 2)
+ return NULL;
+
dev_dbg(codec->dev, "%s:Find module#%d\n", __func__, dev_id);
mutex_lock(&codec->lock);
@@ -377,7 +379,6 @@ static int gbcodec_mixer_dapm_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
int ret;
- struct gb_audio_ctl_elem_info *info;
struct gbaudio_ctl_pvt *data;
struct gb_audio_ctl_elem_value gbvalue;
struct gbaudio_module_info *module;
@@ -393,7 +394,6 @@ static int gbcodec_mixer_dapm_ctl_get(struct snd_kcontrol *kcontrol,
return -EINVAL;
data = (struct gbaudio_ctl_pvt *)kcontrol->private_value;
- info = (struct gb_audio_ctl_elem_info *)data->info;
bundle = to_gb_bundle(module->dev);
if (data->vcount == 2)