All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: sof: Fix warning when IPC flood test is not enabled
@ 2019-08-08 22:18 Mark Brown
  2019-08-08 22:35 ` Sridharan, Ranjani
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2019-08-08 22:18 UTC (permalink / raw)
  To: Liam Girdwood, Pierre-Louis Bossart; +Cc: alsa-devel, Mark Brown

dentry is only used when the flood test is done so move the declaration
of the variable inside the ifdef for the flood test.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sof/debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index 40940b2fe9d5..54cd431faab7 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -221,7 +221,6 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
 {
 	struct snd_sof_dfsentry *dfse = file->private_data;
 	struct snd_sof_dev *sdev = dfse->sdev;
-	struct dentry *dentry;
 	loff_t pos = *ppos;
 	size_t size_ret;
 	int skip = 0;
@@ -229,6 +228,8 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
 	u8 *buf;
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST)
+	struct dentry *dentry;
+
 	dentry = file->f_path.dentry;
 	if ((!strcmp(dentry->d_name.name, "ipc_flood_count") ||
 	     !strcmp(dentry->d_name.name, "ipc_flood_duration_ms")) &&
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: sof: Fix warning when IPC flood test is not enabled
  2019-08-08 22:18 [PATCH] ASoC: sof: Fix warning when IPC flood test is not enabled Mark Brown
@ 2019-08-08 22:35 ` Sridharan, Ranjani
  0 siblings, 0 replies; 2+ messages in thread
From: Sridharan, Ranjani @ 2019-08-08 22:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Liam Girdwood, Pierre-Louis Bossart

On Thu, Aug 8, 2019 at 3:21 PM Mark Brown <broonie@kernel.org> wrote:

> dentry is only used when the flood test is done so move the declaration
> of the variable inside the ifdef for the flood test.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
>
Looks good, thanks, Mark.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

> ---
>  sound/soc/sof/debug.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
> index 40940b2fe9d5..54cd431faab7 100644
> --- a/sound/soc/sof/debug.c
> +++ b/sound/soc/sof/debug.c
> @@ -221,7 +221,6 @@ static ssize_t sof_dfsentry_read(struct file *file,
> char __user *buffer,
>  {
>         struct snd_sof_dfsentry *dfse = file->private_data;
>         struct snd_sof_dev *sdev = dfse->sdev;
> -       struct dentry *dentry;
>         loff_t pos = *ppos;
>         size_t size_ret;
>         int skip = 0;
> @@ -229,6 +228,8 @@ static ssize_t sof_dfsentry_read(struct file *file,
> char __user *buffer,
>         u8 *buf;
>
>  #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST)
> +       struct dentry *dentry;
> +
>         dentry = file->f_path.dentry;
>         if ((!strcmp(dentry->d_name.name, "ipc_flood_count") ||
>              !strcmp(dentry->d_name.name, "ipc_flood_duration_ms")) &&
> --
> 2.20.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-08 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08 22:18 [PATCH] ASoC: sof: Fix warning when IPC flood test is not enabled Mark Brown
2019-08-08 22:35 ` Sridharan, Ranjani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.