ASoC: SOF: Disable pointless writes to debugfs file
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 4 Apr 2024 07:38:45 +0000 (10:38 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 4 Apr 2024 15:24:28 +0000 (16:24 +0100)
The permissions on this debugfs file are 0444 so it can't be written to.
And writing to the file hasn't done anything since commit 6e9548cdb30e
("ASoC: SOF: Convert the generic IPC flood test into SOF client").
Delete the write function.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://msgid.link/r/9d2477cf-25aa-4d12-818f-fdafc9aaa28a@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/debug.c

index 7c8aafca8fdef8eb65211dcd8cbead13077a6068..937e51b02a2453922a9b31001a142536fc35a654 100644 (file)
 #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 */