linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vaibhav Agarwal <vaibhav.sr@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alex Elder <elder@kernel.org>, Johan Hovold <johan@kernel.org>,
	Mark Greer <mgreer@animalcreek.com>
Cc: greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Vaibhav Agarwal <vaibhav.sr@gmail.com>,
	kernel test robot <lkp@intel.com>
Subject: [PATCH v4 7/7] drivers: staging: audio: Fix the missing header file for helper file
Date: Thu,  9 Jul 2020 15:57:23 +0530	[thread overview]
Message-ID: <6341df9b0b5985047af0bbbc8e136481ac515b25.1594290158.git.vaibhav.sr@gmail.com> (raw)
In-Reply-To: <cover.1594290158.git.vaibhav.sr@gmail.com>

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>
---
 drivers/staging/greybus/audio_helper.c   | 1 +
 drivers/staging/greybus/audio_topology.c | 8 ++++----
 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)
-- 
2.27.0


      parent reply	other threads:[~2020-07-09 10:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 10:27 [PATCH v4 0/7] Enable Greybus Audio codec driver Vaibhav Agarwal
2020-07-09 10:27 ` [PATCH v4 1/7] staging: greybus: audio: Update snd_jack FW usage as per new APIs Vaibhav Agarwal
2020-08-05 13:05   ` [greybus-dev] " Alex Elder
2020-08-05 16:52     ` Vaibhav Agarwal
2020-07-09 10:27 ` [PATCH v4 2/7] staging: greybus: audio: Maintain jack list within GB Audio module Vaibhav Agarwal
2020-07-09 10:27 ` [PATCH v4 3/7] staging: greybus: audio: Resolve compilation errors for GB codec module Vaibhav Agarwal
2020-07-09 10:27 ` [PATCH v4 4/7] staging: greybus: audio: Resolve compilation error in topology parser Vaibhav Agarwal
2020-07-09 10:27 ` [PATCH v4 5/7] staging: greybus: audio: Add helper APIs for dynamic audio modules Vaibhav Agarwal
2020-07-09 10:27 ` [PATCH v4 6/7] staging: greybus: audio: Enable GB codec, audio module compilation Vaibhav Agarwal
2020-07-09 10:27 ` Vaibhav Agarwal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6341df9b0b5985047af0bbbc8e136481ac515b25.1594290158.git.vaibhav.sr@gmail.com \
    --to=vaibhav.sr@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mgreer@animalcreek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).