[PATCH] ASoC: SOF: debug: delete sof_dfsentry_write()
Dan Carpenter
dan.carpenter at oracle.com
Wed Jul 6 09:28:21 CEST 2022
The sof_dfsentry_write() function used to have a purpose but now it is a
no-op. It allocates a zeroed buffer, copies at least one byte of data
to it, and then frees it without doing anything. Just delete the
function.
Fixes: 6e9548cdb30e ("ASoC: SOF: Convert the generic IPC flood test into SOF client")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
>From review. Not tested.
sound/soc/sof/debug.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index c5d797e97c02..00abc2000bfb 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -19,24 +19,6 @@
#include "sof-priv.h"
#include "ops.h"
-static ssize_t sof_dfsentry_write(struct file *file, const char __user *buffer,
- size_t count, loff_t *ppos)
-{
- size_t size;
- char *string;
- int ret;
-
- string = kzalloc(count+1, GFP_KERNEL);
- if (!string)
- return -ENOMEM;
-
- size = simple_write_to_buffer(string, count, ppos, buffer, count);
- ret = size;
-
- kfree(string);
- return ret;
-}
-
static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos)
{
@@ -126,7 +108,6 @@ static const struct file_operations sof_dfs_fops = {
.open = simple_open,
.read = sof_dfsentry_read,
.llseek = default_llseek,
- .write = sof_dfsentry_write,
};
/* create FS entry for debug files that can expose DSP memories, registers */
--
2.35.1
More information about the Alsa-devel
mailing list