Commit f6326fa4 authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@kernel.org>
parent e1b14155
...@@ -221,7 +221,6 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer, ...@@ -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_dfsentry *dfse = file->private_data;
struct snd_sof_dev *sdev = dfse->sdev; struct snd_sof_dev *sdev = dfse->sdev;
struct dentry *dentry;
loff_t pos = *ppos; loff_t pos = *ppos;
size_t size_ret; size_t size_ret;
int skip = 0; int skip = 0;
...@@ -229,6 +228,8 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer, ...@@ -229,6 +228,8 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
u8 *buf; u8 *buf;
#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST) #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST)
struct dentry *dentry;
dentry = file->f_path.dentry; dentry = file->f_path.dentry;
if ((!strcmp(dentry->d_name.name, "ipc_flood_count") || if ((!strcmp(dentry->d_name.name, "ipc_flood_count") ||
!strcmp(dentry->d_name.name, "ipc_flood_duration_ms")) && !strcmp(dentry->d_name.name, "ipc_flood_duration_ms")) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment