summary refs log tree commit diff
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-08-08 23:15:54 +0100
committerMark Brown <broonie@kernel.org>2019-08-08 23:15:54 +0100
commitf6326fa4855b0f8173af822fcc139afdbf4d4b71 (patch)
tree454aa82b0ea1a02a916e4ed8955a21efd0367f87 /sound/soc/sof
parente1b141552bdf3250e43bd4c60563142b27ce855f (diff)
downloadlinux-f6326fa4855b0f8173af822fcc139afdbf4d4b71.tar.gz
ASoC: sof: Fix warning when IPC flood test is not enabled
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>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/debug.c3
1 files changed, 2 insertions, 1 deletions
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")) &&